2009-04-10 Eli Zaretskii <eliz@gnu.org>
+ * mail/unrmail.el (unrmail): If "Mail-From" header is found,
+ append a newline to it.
+
* mail/rmail.el (rmail-unrmail-new-mail)
(rmail-unrmail-new-mail-maybe): New functions.
(rmail-insert-inbox-text): Use rmail-unrmail-new-mail-maybe to
(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.
(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