# HG changeset patch # User Eli Zaretskii # Date 1239364439 0 # Node ID 510e9d4f2aa4b469278ac74d829b53d318a7aadb # Parent 928b6319c9915d1bd729ecd24211178e6e89ea12 (unrmail): If "Mail-From" header is found, append a newline to it. diff -r 928b6319c991 -r 510e9d4f2aa4 lisp/mail/unrmail.el --- 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