(riece-menu-create-channels-menu): Remove
authorueno <ueno>
Tue, 27 May 2008 09:26:24 +0000 (09:26 +0000)
committerueno <ueno>
Tue, 27 May 2008 09:26:24 +0000 (09:26 +0000)
placeholder channels.

lisp/ChangeLog
lisp/riece-menu.el

index 132e0d3..4bb8a31 100644 (file)
@@ -1,5 +1,10 @@
 2008-05-27  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-menu.el (riece-menu-create-channels-menu): Remove
+       placeholder channels.
+
+2008-05-27  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-addon-modules.el (riece-addon-modules): Translate add-on
        description.
 
index a1524f3..6e6a6c7 100644 (file)
          riece-layout-alist))
 
 (defun riece-menu-create-channels-menu (menu)
-  (mapcar (lambda (channel)
-           (list (riece-format-identity channel)
-                 (vector (riece-mcat "Switch To Channel")
-                         (list 'riece-command-switch-to-channel channel) t)
-                 (vector (riece-mcat "Part Channel")
-                         (list 'riece-command-part channel) t)
-                 (vector (riece-mcat "List Channel")
-                         (list 'riece-command-list
-                               (riece-identity-prefix channel)) t)))
-         riece-current-channels))
+  (delq nil
+       (mapcar (lambda (channel)
+                 (if channel
+                     (list (riece-format-identity channel)
+                           (vector (riece-mcat "Switch To Channel")
+                                   (list 'riece-command-switch-to-channel
+                                         channel)
+                                   t)
+                           (vector (riece-mcat "Part Channel")
+                                   (list 'riece-command-part channel) t)
+                           (vector (riece-mcat "List Channel")
+                                   (list 'riece-command-list
+                                         (riece-identity-prefix channel)) t))))
+               riece-current-channels)))
 
 (defun riece-menu-create-servers-menu (menu)
   (mapcar (lambda (entry)