summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/rmail.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 6658185005d..d5b5349d7cb 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -170,11 +170,12 @@ Called with region narrowed to unformatted header.")
(defmacro rmail-select-summary (&rest body)
(` (progn (if (rmail-summary-displayed)
(let ((window (selected-window)))
- (unwind-protect
- (progn
- (pop-to-buffer rmail-summary-buffer)
- (,@ body))
- (select-window window)))
+ (save-excursion
+ (unwind-protect
+ (progn
+ (pop-to-buffer rmail-summary-buffer)
+ (,@ body))
+ (select-window window))))
(save-excursion
(set-buffer rmail-summary-buffer)
(progn (,@ body))))