]> git.eshelyaron.com Git - emacs.git/commitdiff
Further rmail.el fix for bug#13066
authorGlenn Morris <rgm@gnu.org>
Thu, 6 Dec 2012 21:41:32 +0000 (16:41 -0500)
committerGlenn Morris <rgm@gnu.org>
Thu, 6 Dec 2012 21:41:32 +0000 (16:41 -0500)
* lisp/mail/rmail.el (rmail-maybe-display-summary):
Preserve buffer, in case select-window changes it.

lisp/ChangeLog
lisp/mail/rmail.el

index 7e63136bac8d4a38aacea16e04f5104d926d431a..2626c14c593a4897743e4aa96454caf87bdce01b 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-06  Glenn Morris  <rgm@gnu.org>
+
+       * mail/rmail.el (rmail-maybe-display-summary):
+       Preserve buffer, in case select-window changes it.  (Bug#13066)
+
 2012-12-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/cl.el, emacs-lisp/cl-lib.el: Move cl-unload-function and
index 372b120046c5c1380ec00a97693e20c81f4a1839..1b76b771f933d92c7ec5f075a8e08b15b0427cc5 100644 (file)
@@ -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)))))
 \f
 ;;;; *** Rmail Local Fontification ***