]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-goto-msg): Use unwind-protect to go
authorRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 03:25:40 +0000 (03:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 03:25:40 +0000 (03:25 +0000)
back to summary, and go back to the window that was selected before.

(rmail-summary-rmail-update): Special handling for eob.

lisp/mail/rmailsum.el

index 7191d35cfe3e46162d06a56a3c32cc223f11ee4f..2e77e44ce5a99ce19708969c0fdf600e98a4e84f 100644 (file)
@@ -528,6 +528,9 @@ Commands for sorting the summary:
   (if (get-buffer-window rmail-buffer)
       (let (buffer-read-only)
        (save-excursion
+         ;; If at end of buffer, pretend we are on the last text line.
+         (if (eobp)
+             (forward-line -1))
          (beginning-of-line)
          (skip-chars-forward " ")
          (let ((beg (point))
@@ -744,9 +747,11 @@ Commands for sorting the summary:
     (beginning-of-line)
     (if skip-rmail
        nil
-      (pop-to-buffer buf)
-      (rmail-show-message n)
-      (pop-to-buffer rmail-summary-buffer))))
+      (let ((selwin (selected-window)))
+       (unwind-protect
+           (progn (pop-to-buffer buf)
+                  (rmail-show-message n))
+         (select-window selwin))))))
 \f
 (defun rmail-summary-scroll-msg-up (&optional dist)
   "Scroll other window forward."