emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106377: rmailout fix for bug#9978.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106377: rmailout fix for bug#9978.
Date: Mon, 14 Nov 2011 19:34:01 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106377
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2011-11-14 19:34:01 -0500
message:
  rmailout fix for bug#9978.
  
  * lisp/mail/rmailout.el (rmail-output-to-rmail-buffer):
  Handle empty buffers.
modified:
  lisp/ChangeLog
  lisp/mail/rmailout.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-14 21:00:24 +0000
+++ b/lisp/ChangeLog    2011-11-15 00:34:01 +0000
@@ -1,3 +1,8 @@
+2011-11-15  Glenn Morris  <address@hidden>
+
+       * mail/rmailout.el (rmail-output-to-rmail-buffer):
+       Handle empty buffers.  (Bug#9978)
+
 2011-11-14  Juanma Barranquero  <address@hidden>
 
        * international/mule.el (define-charset):

=== modified file 'lisp/mail/rmailout.el'
--- a/lisp/mail/rmailout.el     2011-01-26 08:36:39 +0000
+++ b/lisp/mail/rmailout.el     2011-11-15 00:34:01 +0000
@@ -377,11 +377,12 @@
     (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]