]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use mapconcat with chars in gnus registry marks (Bug#25839)
authorEric Abrahamsen <eric@ericabrahamsen.net>
Thu, 23 Feb 2017 01:26:11 +0000 (17:26 -0800)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 1 Mar 2017 02:57:07 +0000 (21:57 -0500)
* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
Instead, use a plain concat, which will create a string out of a list
of characters.

lisp/gnus/gnus-registry.el

index f728b191110b5149782e031a520de65eef208d19..51f6459d2f86fef6cbbb1b37b953790d2a2f88ea 100644 (file)
@@ -968,12 +968,13 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
   "Show the marks for an article by the :char property."
   (let* ((id (mail-header-message-id headers))
          (marks (when id (gnus-registry-get-id-key id 'mark))))
-    (mapconcat (lambda (mark)
-                 (plist-get
-                  (cdr-safe
-                   (assoc mark gnus-registry-marks))
-                  :char))
-               marks "")))
+    (concat (delq nil
+                 (mapcar
+                  (lambda (m)
+                    (plist-get
+                     (cdr-safe (assoc m gnus-registry-marks))
+                     :char))
+                  marks)))))
 
 ;; use like this:
 ;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)