Mercurial > emacs
changeset 102927:510e9d4f2aa4
(unrmail): If "Mail-From" header is found, append a newline to it.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 10 Apr 2009 11:53:59 +0000 |
parents | 928b6319c991 |
children | 5238ed3b4c68 |
files | lisp/mail/unrmail.el |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/unrmail.el Fri Apr 10 10:42:07 2009 +0000 +++ b/lisp/mail/unrmail.el Fri Apr 10 11:53:59 2009 +0000 @@ -191,7 +191,13 @@ (save-excursion (search-forward "\n\n" nil 'move) (point))) ;; Fetch or construct what we should use in the `From ' line. - (setq mail-from (or (mail-fetch-field "Mail-From") + (setq mail-from (or (let ((from (mail-fetch-field "Mail-From"))) + ;; mail-mbox-from (below) returns a + ;; string that ends in a newline, but + ;; but mail-fetch-field does not, so + ;; we append a newline here. + (if from + (format "%s\n" from))) (mail-mbox-from))) ;; If the message specifies a coding system, use it. @@ -213,7 +219,7 @@ (goto-char (point-min)) ;; Insert the `From ' line. - (insert mail-from "\n") + (insert mail-from) ;; Record the keywords and attributes in our special way. (insert "X-RMAIL-ATTRIBUTES: " (apply 'string attrs) "\n") (when keywords