(gnus-registry-user-format-function-M): Fix concat bug.
authorTeodor Zlatanov <tzz@lifelogs.com>
Thu, 6 Mar 2008 21:08:22 +0000 (21:08 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Thu, 6 Mar 2008 21:08:22 +0000 (21:08 +0000)
lisp/ChangeLog
lisp/gnus-registry.el

index ec83f6e..3cb952f 100644 (file)
@@ -1,3 +1,7 @@
+2008-03-06  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry-user-format-function-M): Fix concat bug.
+
 2008-03-05  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-registry.el (gnus-registry-install): Allow 'ask as an option.
index 3f3ad6a..5141a5e 100644 (file)
@@ -781,14 +781,19 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
 ;;; use like this:
 ;;; (defalias 'gnus-user-format-function-M 
 ;;;           'gnus-registry-user-format-function-M)
-  (defun gnus-registry-user-format-function-M (headers)
+(defun gnus-registry-user-format-function-M (headers)
   (let* ((id (mail-header-message-id headers))
         (marks (when id (gnus-registry-fetch-extra-marks id))))
-    (concat (mapcar (lambda(mark)
-                     (list (plist-get
-                            (cdr-safe (assoc mark gnus-registry-marks))
-                            :char)))
-                   marks))))
+    (apply 'concat (mapcar (lambda(mark)
+                            (let ((c 
+                                   (plist-get
+                                    (cdr-safe 
+                                     (assoc mark gnus-registry-marks))
+                                    :char)))
+                              (if c
+                                  (list c)
+                                nil)))
+                          marks))))
 
 (defun gnus-registry-read-mark ()
   "Read a mark name from the user with completion."