1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00

* mail/unrmail.el (unrmail): Make sure the message ends with two

newlines (Bug#3769).
This commit is contained in:
Chong Yidong 2009-07-08 03:10:10 +00:00
parent ee047ec4c6
commit 88d036078b
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-07-08 E. Jay Berkenbilt <ejb@ql.org> (tiny change)
* mail/unrmail.el (unrmail): Make sure the message ends with two
newlines (Bug#3769).
2009-07-08 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (calendar-current-date): Rework previous change.

View File

@ -232,6 +232,10 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'."
(while (search-forward "\nFrom " nil t)
(forward-char -5)
(insert ?>)))
;; Make sure the message ends with two newlines
(goto-char (point-max))
(unless (looking-back "\n\n")
(insert "\n"))
;; Write it to the output file, suitably encoded.
(let ((coding-system-for-write coding))
(write-region (point-min) (point-max) to-file t