From 070261664710ac7af1c49b6a97ecfed2f17c9431 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 6 Dec 2012 16:41:32 -0500 Subject: [PATCH] Further rmail.el fix for bug#13066 * lisp/mail/rmail.el (rmail-maybe-display-summary): Preserve buffer, in case select-window changes it. --- lisp/ChangeLog | 5 +++++ lisp/mail/rmail.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e63136bac8..2626c14c593 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-12-06 Glenn Morris + + * mail/rmail.el (rmail-maybe-display-summary): + Preserve buffer, in case select-window changes it. (Bug#13066) + 2012-12-06 Stefan Monnier * emacs-lisp/cl.el, emacs-lisp/cl-lib.el: Move cl-unload-function and diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 372b120046c..1b76b771f93 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4194,6 +4194,7 @@ This has an effect only if a summary buffer exists." ;; Put the summary buffer back on the screen, if user wants that. (defun rmail-maybe-display-summary () (let ((selected (selected-window)) + (buffer (current-buffer)) window) ;; If requested, make sure the summary is displayed. (and rmail-summary-buffer (buffer-name rmail-summary-buffer) @@ -4215,7 +4216,8 @@ This has an effect only if a summary buffer exists." (progn (select-window window) (enlarge-window (- rmail-summary-window-size (window-height)))) - (select-window selected))))) + (select-window selected) + (set-buffer buffer))))) ;;;; *** Rmail Local Fontification *** -- 2.39.5