]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-goto-msg): Preserve the current buffer.
authorRichard M. Stallman <rms@gnu.org>
Tue, 13 Sep 1994 04:14:00 +0000 (04:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 13 Sep 1994 04:14:00 +0000 (04:14 +0000)
lisp/mail/rmailsum.el

index 5a009ce55dc40cced60edebc911b2fa7e2fa6f2c..46ea888fe065187c49ceb0d9d1166847b2b11786 100644 (file)
@@ -780,7 +780,8 @@ Commands for sorting the summary:
   (if (consp n) (setq n (prefix-numeric-value n)))
   (if (eobp) (forward-line -1))
   (beginning-of-line)
-  (let ((buf rmail-buffer)
+  (let ((obuf (current-buffer))
+       (buf rmail-buffer)
        (cur (point))
        message-not-found
        (curmsg (string-to-int
@@ -832,7 +833,9 @@ Commands for sorting the summary:
        (unwind-protect
            (progn (pop-to-buffer buf)
                   (rmail-show-message n))
-         (select-window selwin))))))
+         (select-window selwin)
+         ;; The actions above can alter the current buffer.  Preserve it.
+         (set-buffer obuf))))))
 \f
 (defun rmail-summary-scroll-msg-up (&optional dist)
   "Scroll the Rmail window forward."