aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2009-04-10 11:54:53 +0000
committerEli Zaretskii2009-04-10 11:54:53 +0000
commit71d8a1403c2992134945daa8737ef44186ed6596 (patch)
tree19a01e703ffc00fbd864555a460ca2b322b21f29
parent910348651bc86a5e0a60c6382338c493da943a54 (diff)
downloademacs-71d8a1403c2992134945daa8737ef44186ed6596.tar.gz
emacs-71d8a1403c2992134945daa8737ef44186ed6596.zip
(unrmail): If "Mail-From" header is found, append a newline to it.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/mail/unrmail.el10
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0290d2142dd..bea19285c9a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-04-10 Eli Zaretskii <eliz@gnu.org> 12009-04-10 Eli Zaretskii <eliz@gnu.org>
2 2
3 * mail/unrmail.el (unrmail): If "Mail-From" header is found,
4 append a newline to it.
5
3 * mail/rmail.el (rmail-unrmail-new-mail) 6 * mail/rmail.el (rmail-unrmail-new-mail)
4 (rmail-unrmail-new-mail-maybe): New functions. 7 (rmail-unrmail-new-mail-maybe): New functions.
5 (rmail-insert-inbox-text): Use rmail-unrmail-new-mail-maybe to 8 (rmail-insert-inbox-text): Use rmail-unrmail-new-mail-maybe to
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'."
191 (save-excursion (search-forward "\n\n" nil 'move) (point))) 191 (save-excursion (search-forward "\n\n" nil 'move) (point)))
192 192
193 ;; Fetch or construct what we should use in the `From ' line. 193 ;; Fetch or construct what we should use in the `From ' line.
194 (setq mail-from (or (mail-fetch-field "Mail-From") 194 (setq mail-from (or (let ((from (mail-fetch-field "Mail-From")))
195 ;; mail-mbox-from (below) returns a
196 ;; string that ends in a newline, but
197 ;; but mail-fetch-field does not, so
198 ;; we append a newline here.
199 (if from
200 (format "%s\n" from)))
195 (mail-mbox-from))) 201 (mail-mbox-from)))
196 202
197 ;; If the message specifies a coding system, use it. 203 ;; If the message specifies a coding system, use it.
@@ -213,7 +219,7 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'."
213 219
214 (goto-char (point-min)) 220 (goto-char (point-min))
215 ;; Insert the `From ' line. 221 ;; Insert the `From ' line.
216 (insert mail-from "\n") 222 (insert mail-from)
217 ;; Record the keywords and attributes in our special way. 223 ;; Record the keywords and attributes in our special way.
218 (insert "X-RMAIL-ATTRIBUTES: " (apply 'string attrs) "\n") 224 (insert "X-RMAIL-ATTRIBUTES: " (apply 'string attrs) "\n")
219 (when keywords 225 (when keywords