diff options
| author | Richard M. Stallman | 1996-12-14 02:11:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-12-14 02:11:32 +0000 |
| commit | 37eb1878a0aae77cda32915dcf2648a17fea7f5b (patch) | |
| tree | c1efa0a00d9902af60c4f711660436cb58269629 | |
| parent | 082f6929d6311ceb15e3de87b1166b5899ad3f29 (diff) | |
| download | emacs-37eb1878a0aae77cda32915dcf2648a17fea7f5b.tar.gz emacs-37eb1878a0aae77cda32915dcf2648a17fea7f5b.zip | |
(rmail-summary-beginning-of-message):
Obey rmail-summary-size, and make sure summary is on top
if we split a single large window.
(rmail-summary-scroll-msg-down): If message is
not visible at all, use rmail-summary-beginning-of-message.
(rmail-summary-scroll-msg-up): Likewise.
| -rw-r--r-- | lisp/mail/rmailsum.el | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index a23a2c7c587..9c04ef524cf 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -1072,14 +1072,13 @@ advance to the next message." | |||
| 1072 | (rmail-summary-next-msg (or dist 1))) | 1072 | (rmail-summary-next-msg (or dist 1))) |
| 1073 | (let ((other-window-scroll-buffer rmail-buffer)) | 1073 | (let ((other-window-scroll-buffer rmail-buffer)) |
| 1074 | (scroll-other-window dist))) | 1074 | (scroll-other-window dist))) |
| 1075 | ;; This forces rmail-buffer to be sized correctly later. | 1075 | ;; If it isn't visible at all, show the beginning. |
| 1076 | (display-buffer rmail-buffer) | 1076 | (rmail-summary-beginning-of-message))))) |
| 1077 | (setq rmail-current-message nil))))) | ||
| 1078 | 1077 | ||
| 1079 | (defun rmail-summary-scroll-msg-down (&optional dist) | 1078 | (defun rmail-summary-scroll-msg-down (&optional dist) |
| 1080 | "Scroll the Rmail window backward. | 1079 | "Scroll the Rmail window backward. |
| 1081 | If the Rmail window is displaying the beginning of a message, | 1080 | If the Rmail window is now displaying the beginning of a message, |
| 1082 | advance to the previous message." | 1081 | move to the previous message." |
| 1083 | (interactive "P") | 1082 | (interactive "P") |
| 1084 | (if (eq dist '-) | 1083 | (if (eq dist '-) |
| 1085 | (rmail-summary-scroll-msg-up nil) | 1084 | (rmail-summary-scroll-msg-up nil) |
| @@ -1099,14 +1098,23 @@ advance to the previous message." | |||
| 1099 | (rmail-summary-previous-msg (or dist 1))) | 1098 | (rmail-summary-previous-msg (or dist 1))) |
| 1100 | (let ((other-window-scroll-buffer rmail-buffer)) | 1099 | (let ((other-window-scroll-buffer rmail-buffer)) |
| 1101 | (scroll-other-window-down dist))) | 1100 | (scroll-other-window-down dist))) |
| 1102 | ;; This forces rmail-buffer to be sized correctly later. | 1101 | ;; If it isn't visible at all, show the beginning. |
| 1103 | (display-buffer rmail-buffer) | 1102 | (rmail-summary-beginning-of-message))))) |
| 1104 | (setq rmail-current-message nil))))) | ||
| 1105 | 1103 | ||
| 1106 | (defun rmail-summary-beginning-of-message () | 1104 | (defun rmail-summary-beginning-of-message () |
| 1107 | "Show current message from the beginning." | 1105 | "Show current message from the beginning." |
| 1108 | (interactive) | 1106 | (interactive) |
| 1109 | (pop-to-buffer rmail-buffer) | 1107 | (if (and (one-window-p) (not pop-up-frames)) |
| 1108 | ;; If there is just one window, put the summary on the top. | ||
| 1109 | (let ((buffer rmail-buffer)) | ||
| 1110 | (split-window (selected-window) rmail-summary-window-size) | ||
| 1111 | (select-window (frame-first-window)) | ||
| 1112 | (pop-to-buffer rmail-buffer) | ||
| 1113 | ;; If pop-to-buffer did not use that window, delete that | ||
| 1114 | ;; window. (This can happen if it uses another frame.) | ||
| 1115 | (or (eq buffer (window-buffer (next-window (frame-first-window)))) | ||
| 1116 | (delete-other-windows))) | ||
| 1117 | (pop-to-buffer rmail-buffer)) | ||
| 1110 | (beginning-of-buffer) | 1118 | (beginning-of-buffer) |
| 1111 | (pop-to-buffer rmail-summary-buffer)) | 1119 | (pop-to-buffer rmail-summary-buffer)) |
| 1112 | 1120 | ||