]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-resend): Work properly if invoked from summary.
authorKarl Heuer <kwzh@gnu.org>
Mon, 21 Sep 1998 19:47:00 +0000 (19:47 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 21 Sep 1998 19:47:00 +0000 (19:47 +0000)
lisp/mail/rmail.el

index 341565bc52a56cf58c66e9d753c63dd0d795f792..dad0cd0aae5ac147f742f96cb6c50d8711490f8f 100644 (file)
@@ -2891,11 +2891,10 @@ typically for purposes of moderating a list."
   (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 @@ typically for purposes of moderating a list."
          (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))))
 \f
 (defvar mail-unsent-separator
   (concat "^ *---+ +Unsent message follows +---+ *$\\|"