diff options
author | Richard M. Stallman <[email protected]> | 1993-12-23 03:25:40 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1993-12-23 03:25:40 +0000 |
commit | 857ff384c0ede66ea0f14537cbf6ae7ed41d48df (patch) | |
tree | 4f91f6010ceec733669d0a9a729aa00bcfa80c48 /lisp/mail | |
parent | d2fc297c3286c2eed26a3141417762f720b4e2e1 (diff) |
(rmail-summary-goto-msg): Use unwind-protect to go
back to summary, and go back to the window that was selected before.
(rmail-summary-rmail-update): Special handling for eob.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/rmailsum.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 7191d35cfe..2e77e44ce5 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -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)))))) (defun rmail-summary-scroll-msg-up (&optional dist) "Scroll other window forward." |