changeset 37839:aac3e63d5361

(rmail-retry-failure): Do save-window-excursion.
author Richard M. Stallman <rms@gnu.org>
date Sun, 20 May 2001 17:17:32 +0000
parents 254485af9aa7
children 1e7b34ebbb0a
files lisp/mail/rmail.el
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Sun May 20 17:17:22 2001 +0000
+++ b/lisp/mail/rmail.el	Sun May 20 17:17:32 2001 +0000
@@ -3422,9 +3422,12 @@
 			  (insert "BCC: " (user-login-name) "\n"))))
 		  (goto-char (point-min))
 		  (mail-position-on-field (if resending "Resent-To" "To") t)))))
-      (with-current-buffer rmail-this-buffer
-	(if pruned
-	    (rmail-toggle-header 1))))))
+      ;; save-window-excursion is needed because of the switch-to-buffer
+      ;; in rmail-toggle-header.
+      (save-window-excursion
+	(with-current-buffer rmail-this-buffer
+	  (if pruned
+	      (rmail-toggle-header 1)))))))
 
 (defun rmail-summary-exists ()
   "Non-nil iff in an RMAIL buffer and an associated summary buffer exists.