Mercurial > emacs
comparison lisp/mail/rmailsum.el @ 16676:82e54a854639
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 14 Dec 1996 02:11:32 +0000 |
parents | 30e3d4ddca44 |
children | 4a2d9b3990e3 |
comparison
equal
deleted
inserted
replaced
16675:6f45dc8d9d56 | 16676:82e54a854639 |
---|---|
1070 (if (not rmail-summary-scroll-between-messages) | 1070 (if (not rmail-summary-scroll-between-messages) |
1071 (error "End of buffer") | 1071 (error "End of buffer") |
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) |
1086 (let ((rmail-buffer-window (get-buffer-window rmail-buffer))) | 1085 (let ((rmail-buffer-window (get-buffer-window rmail-buffer))) |
1087 (if rmail-buffer-window | 1086 (if rmail-buffer-window |
1097 (if (not rmail-summary-scroll-between-messages) | 1096 (if (not rmail-summary-scroll-between-messages) |
1098 (error "Beginning of buffer") | 1097 (error "Beginning of buffer") |
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 |
1113 (defun rmail-summary-bury () | 1121 (defun rmail-summary-bury () |
1114 "Bury the Rmail buffer and the Rmail summary buffer." | 1122 "Bury the Rmail buffer and the Rmail summary buffer." |