1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

rmailout fix for bug#9978.

* lisp/mail/rmailout.el (rmail-output-to-rmail-buffer):
Handle empty buffers.
This commit is contained in:
Glenn Morris 2011-11-14 19:34:01 -05:00
parent 91af3942e9
commit 447f30f64b
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2011-11-15 Glenn Morris <rgm@gnu.org>
* mail/rmailout.el (rmail-output-to-rmail-buffer):
Handle empty buffers. (Bug#9978)
2011-11-14 Juanma Barranquero <lekktu@gmail.com>
* international/mule.el (define-charset):

View file

@ -377,11 +377,12 @@ display message number MSG."
(rmail-maybe-set-message-counters)
;; Insert the new message after the last old message.
(widen)
;; Make sure the last old message ends with a blank line.
(goto-char (point-max))
(rmail-ensure-blank-line)
;; Insert the new message at the end.
(narrow-to-region (point-max) (point-max))
(unless (zerop (buffer-size))
;; Make sure the last old message ends with a blank line.
(goto-char (point-max))
(rmail-ensure-blank-line)
;; Insert the new message at the end.
(narrow-to-region (point-max) (point-max)))
(insert-buffer-substring tembuf)
(rmail-count-new-messages t)
;; FIXME should re-use existing windows.