summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-07-08 03:10:59 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-07-08 03:10:59 +0000
commit764d72cf02fcff6c08c1fc6cffac664d87080c16 (patch)
tree3c95c303da12e44692b50c6c070ce5a9c9499c5b
parenta6cb3660055fb1328528bd352f3afdc631c0d4ab (diff)
downloademacs-764d72cf02fcff6c08c1fc6cffac664d87080c16.tar.gz
* mail/unrmail.el (unrmail): Make sure the message ends with two
newlines (Bug#3769).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/unrmail.el4
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bca414bbae7..6cdf1b992e3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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 Kenichi Handa <handa@m17n.org>
* language/japanese.el (japanese-shift-jis-2004): Fix typo in the
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index cd71ec58571..e06c41b2c2e 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -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