]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix alternative-email-as-from with empty To headers in Message
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 9 Jul 2019 17:19:56 +0000 (19:19 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 9 Jul 2019 17:41:11 +0000 (19:41 +0200)
* lisp/gnus/message.el (message-use-alternative-email-as-from):
Don't add a "," at the start of the address if the To header
doesn't exist (bug#34293).

lisp/gnus/message.el

index fbe8b45140136a8ddd1680775c1a92b04274333d..727bbabcb2400d445575c0cb6beca7e76b69d43e 100644 (file)
@@ -8108,7 +8108,13 @@ From headers in the original article."
         (emails
          (message-tokenize-header
           (mail-strip-quoted-names
-           (mapconcat 'message-fetch-reply-field fields ","))))
+           (mapconcat
+            #'identity
+            (cl-loop for field in fields
+                     for value = (message-fetch-reply-field field)
+                     when value
+                     collect value)
+            ","))))
         (email
           (cond ((functionp message-alternative-emails)
                  (car (cl-remove-if-not message-alternative-emails emails)))