changeset 23298:116f19dd86dc

(rmail-resend): Work properly if invoked from summary.
author Karl Heuer <kwzh@gnu.org>
date Mon, 21 Sep 1998 19:47:00 +0000
parents e23cdc314c10
children 00fa89a27438
files lisp/mail/rmail.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Mon Sep 21 19:45:14 1998 +0000
+++ b/lisp/mail/rmail.el	Mon Sep 21 19:47:00 1998 +0000
@@ -2891,11 +2891,10 @@
   (if (not from) (setq from user-mail-address))
   (let ((tembuf (generate-new-buffer " sendmail temp"))
 	(case-fold-search nil)
-	(mailbuf (current-buffer)))
+	(mailbuf rmail-buffer))
     (unwind-protect
-	(save-excursion
+	(with-current-buffer tembuf
 	  ;;>> Copy message into temp buffer
-	  (set-buffer tembuf)
 	  (insert-buffer-substring mailbuf)
 	  (goto-char (point-min))
 	  ;; Delete any Sender field, since that's not specifiable.
@@ -2957,7 +2956,8 @@
 	  (let (mail-aliases)
 	    (funcall send-mail-function)))
       (kill-buffer tembuf))
-    (rmail-set-attribute "resent" t rmail-current-message)))
+    (with-current-buffer rmail-buffer
+      (rmail-set-attribute "resent" t rmail-current-message))))
 
 (defvar mail-unsent-separator
   (concat "^ *---+ +Unsent message follows +---+ *$\\|"