Fix alternative-email-as-from with empty To headers in Message

* 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).
This commit is contained in:
Lars Ingebrigtsen
2019-07-09 19:19:56 +02:00
parent 7c548a29c0
commit 75af25cba0

View 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)))