changeset 37613:d5dbe7f1300c

(rmail-output-read-rmail-file-name): Be sure to set-buffer to the Rmail buffer. (rmail-output-to-rmail-file): Likewise. (rmail-output): Likewise.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 08 May 2001 11:18:20 +0000
parents 15fa3a1c6e88
children 17db314acfc2
files lisp/mail/rmailout.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailout.el	Tue May 08 11:17:55 2001 +0000
+++ b/lisp/mail/rmailout.el	Tue May 08 11:18:20 2001 +0000
@@ -1,6 +1,6 @@
 ;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file.
 
-;; Copyright (C) 1985, 1987, 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1993, 1994, 2001 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: mail
@@ -50,8 +50,7 @@
 	    ;; Suggest a file based on a pattern match.
 	    (while (and tail (not answer))
 	      (save-excursion
-		(if (eq major-mode 'rmail-summary-mode)
-		    (set-buffer rmail-buffer)) 
+		(set-buffer rmail-buffer)
 		(goto-char (point-min))
 		(if (re-search-forward (car (car tail)) nil t)
 		    (setq answer (eval (cdr (car tail)))))
@@ -156,6 +155,7 @@
       (let (redelete)
 	(unwind-protect
 	    (progn
+	      (set-buffer rmail-buffer)
 	      ;; Temporarily turn off Deleted attribute.
 	      ;; Do this outside the save-restriction, since it would
 	      ;; shift the place in the buffer where the visible text starts.
@@ -287,6 +287,7 @@
 			       (file-name-directory rmail-default-file))))
   (if (and (file-readable-p file-name) (mail-file-babyl-p file-name))
       (rmail-output-to-rmail-file file-name count)
+    (set-buffer rmail-buffer)
     (let ((orig-count count)
 	  (rmailbuf (current-buffer))
 	  (case-fold-search t)