diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-04-10 11:54:53 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-04-10 11:54:53 +0000 |
commit | 71d8a1403c2992134945daa8737ef44186ed6596 (patch) | |
tree | 19a01e703ffc00fbd864555a460ca2b322b21f29 /lisp/mail/unrmail.el | |
parent | 910348651bc86a5e0a60c6382338c493da943a54 (diff) | |
download | emacs-71d8a1403c2992134945daa8737ef44186ed6596.tar.gz |
(unrmail): If "Mail-From" header is found, append a newline to it.
Diffstat (limited to 'lisp/mail/unrmail.el')
-rw-r--r-- | lisp/mail/unrmail.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index bb73b82c9ef..cd71ec58571 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -191,7 +191,13 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (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 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (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 |