]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix message-mode bug with fcc to Rmail buffers.
authorGlenn Morris <rgm@gnu.org>
Tue, 21 Sep 2010 03:11:34 +0000 (20:11 -0700)
committerGlenn Morris <rgm@gnu.org>
Tue, 21 Sep 2010 03:11:34 +0000 (20:11 -0700)
* lisp/gnus/message.el (message-output): Use gnus-output-to-rmail if a
buffer is visiting the fcc file in rmail-mode.

lisp/gnus/ChangeLog
lisp/gnus/message.el

index ab1210af5b5efb69068c0b4252dd81d5ffdd8c0b..931ce7182c6c1fa24b04d8b122a836e05556c4a4 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-21  Glenn Morris  <rgm@gnu.org>
+
+       * message.el (message-output): Use gnus-output-to-rmail if a buffer is
+       visiting the fcc file in rmail-mode.
+
 2010-04-22  Andreas Seltenreich  <seltenreich@gmx.de>
 
        * message.el (message-generate-headers): Record insertion of optional
index 2fe8a4d32ef5ce3941c67af21bca371db65f743a..214ac0b3906e95a35172ba2ecf0ed431c5d59677 100644 (file)
@@ -5311,8 +5311,14 @@ Otherwise, generate and save a value for `canlock-password' first."
 
 (defun message-output (filename)
   "Append this article to Unix/babyl mail file FILENAME."
-  (if (and (file-readable-p filename)
-          (mail-file-babyl-p filename))
+  (if (or (and (file-readable-p filename)
+              (mail-file-babyl-p filename))
+         ;; gnus-output-to-mail does the wrong thing with live, mbox
+         ;; Rmail buffers in Emacs 23.
+         ;; http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597255
+         (let ((buff (find-buffer-visiting filename)))
+           (and buff (with-current-buffer buff
+                       (eq major-mode 'rmail-mode)))))
       (gnus-output-to-rmail filename t)
     (gnus-output-to-mail filename t)))