changeset 103773:5cc45bab5282

* mail/unrmail.el (unrmail): Make sure the message ends with two newlines (Bug#3769).
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 08 Jul 2009 03:10:10 +0000
parents 87cf23904293
children 5048b64c7cf0
files lisp/ChangeLog lisp/mail/unrmail.el
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jul 08 02:51:21 2009 +0000
+++ b/lisp/ChangeLog	Wed Jul 08 03:10:10 2009 +0000
@@ -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.
--- a/lisp/mail/unrmail.el	Wed Jul 08 02:51:21 2009 +0000
+++ b/lisp/mail/unrmail.el	Wed Jul 08 03:10:10 2009 +0000
@@ -232,6 +232,10 @@
 	      (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