aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-11-14 19:34:01 -0500
committerGlenn Morris2011-11-14 19:34:01 -0500
commit447f30f64b9269fa71faaa2dedf6b1f3957516fe (patch)
tree9e156505dd845cc9afaafc02c083cc10336e6c4e
parent91af3942e9ab5540b3ab4dde6733bc883dc2abdd (diff)
downloademacs-447f30f64b9269fa71faaa2dedf6b1f3957516fe.tar.gz
emacs-447f30f64b9269fa71faaa2dedf6b1f3957516fe.zip
rmailout fix for bug#9978.
* lisp/mail/rmailout.el (rmail-output-to-rmail-buffer): Handle empty buffers.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/rmailout.el11
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 091117ef53d..a6d49015422 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-11-15 Glenn Morris <rgm@gnu.org>
2
3 * mail/rmailout.el (rmail-output-to-rmail-buffer):
4 Handle empty buffers. (Bug#9978)
5
12011-11-14 Juanma Barranquero <lekktu@gmail.com> 62011-11-14 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * international/mule.el (define-charset): 8 * international/mule.el (define-charset):
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 3926b426a67..c168ca9d8f5 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -377,11 +377,12 @@ display message number MSG."
377 (rmail-maybe-set-message-counters) 377 (rmail-maybe-set-message-counters)
378 ;; Insert the new message after the last old message. 378 ;; Insert the new message after the last old message.
379 (widen) 379 (widen)
380 ;; Make sure the last old message ends with a blank line. 380 (unless (zerop (buffer-size))
381 (goto-char (point-max)) 381 ;; Make sure the last old message ends with a blank line.
382 (rmail-ensure-blank-line) 382 (goto-char (point-max))
383 ;; Insert the new message at the end. 383 (rmail-ensure-blank-line)
384 (narrow-to-region (point-max) (point-max)) 384 ;; Insert the new message at the end.
385 (narrow-to-region (point-max) (point-max)))
385 (insert-buffer-substring tembuf) 386 (insert-buffer-substring tembuf)
386 (rmail-count-new-messages t) 387 (rmail-count-new-messages t)
387 ;; FIXME should re-use existing windows. 388 ;; FIXME should re-use existing windows.