diff lisp/mail/unrmail.el @ 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 510e9d4f2aa4
children 1d1d5d9bd884
line wrap: on
line diff
--- 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