diff options
| author | Kenichi Handa | 1997-02-26 13:05:13 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-02-26 13:05:13 +0000 |
| commit | db56d71e952c6a957aaa38cffd501ff1c2fd5315 (patch) | |
| tree | 89185ad721830791568b7c8274351a255a7954a2 | |
| parent | 5350ad1dda5764b75ee962dd1b57a7dfa9988385 (diff) | |
| download | emacs-db56d71e952c6a957aaa38cffd501ff1c2fd5315.tar.gz emacs-db56d71e952c6a957aaa38cffd501ff1c2fd5315.zip | |
(rmail-new-summary): Setup rmail-view-buffer.
(rmail-summary-line-decoder): New variable.
(rmail-make-summary-line-1): Use a function set in
rmail-summary-line-decoder.
(rmail-summary-next-msg): Display rmail-view-buffer.
(rmail-summary-mode): Make rmail-view-buffer buffer local.
(rmail-summary-rmail-update, rmail-summary-scroll-msg-up): Use
rmail-view-buffer instead of rmail-buffer.
| -rw-r--r-- | lisp/mail/rmailsum.el | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 9c04ef524cf..04d1fc11351 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -204,6 +204,7 @@ nil for FUNCTION means all messages." | |||
| 204 | (setq rmail-summary-buffer nil) | 204 | (setq rmail-summary-buffer nil) |
| 205 | (save-excursion | 205 | (save-excursion |
| 206 | (let ((rbuf (current-buffer)) | 206 | (let ((rbuf (current-buffer)) |
| 207 | (vbuf rmail-view-buffer) | ||
| 207 | (total rmail-total-messages)) | 208 | (total rmail-total-messages)) |
| 208 | (set-buffer sumbuf) | 209 | (set-buffer sumbuf) |
| 209 | ;; Set up the summary buffer's contents. | 210 | ;; Set up the summary buffer's contents. |
| @@ -219,6 +220,7 @@ nil for FUNCTION means all messages." | |||
| 219 | (make-local-variable 'minor-mode-alist) | 220 | (make-local-variable 'minor-mode-alist) |
| 220 | (setq minor-mode-alist (list (list t (concat ": " description)))) | 221 | (setq minor-mode-alist (list (list t (concat ": " description)))) |
| 221 | (setq rmail-buffer rbuf | 222 | (setq rmail-buffer rbuf |
| 223 | rmail-view-buffer vbuf | ||
| 222 | rmail-summary-redo redo-form | 224 | rmail-summary-redo redo-form |
| 223 | rmail-total-messages total)))) | 225 | rmail-total-messages total)))) |
| 224 | (setq rmail-summary-buffer sumbuf)) | 226 | (setq rmail-summary-buffer sumbuf)) |
| @@ -264,6 +266,12 @@ nil for FUNCTION means all messages." | |||
| 264 | ?\- ?\ ))) | 266 | ?\- ?\ ))) |
| 265 | line)) | 267 | line)) |
| 266 | 268 | ||
| 269 | ;;;###autoload | ||
| 270 | (defvar rmail-summary-line-decoder (function identity) | ||
| 271 | "*Function to decode summary-line. | ||
| 272 | |||
| 273 | By default, `identity' is set.") | ||
| 274 | |||
| 267 | (defun rmail-make-summary-line-1 (msg) | 275 | (defun rmail-make-summary-line-1 (msg) |
| 268 | (goto-char (rmail-msgbeg msg)) | 276 | (goto-char (rmail-msgbeg msg)) |
| 269 | (let* ((lim (save-excursion (forward-line 2) (point))) | 277 | (let* ((lim (save-excursion (forward-line 2) (point))) |
| @@ -318,10 +326,12 @@ nil for FUNCTION means all messages." | |||
| 318 | (insert "Summary-line: " line))) | 326 | (insert "Summary-line: " line))) |
| 319 | (setq pos (string-match "#" line)) | 327 | (setq pos (string-match "#" line)) |
| 320 | (aset rmail-summary-vector (1- msg) | 328 | (aset rmail-summary-vector (1- msg) |
| 321 | (concat (format "%4d " msg) | 329 | (funcall rmail-summary-line-decoder |
| 322 | (substring line 0 pos) | 330 | (concat (format "%4d " msg) |
| 323 | labels | 331 | (substring line 0 pos) |
| 324 | (substring line (1+ pos)))))) | 332 | labels |
| 333 | (substring line (1+ pos))))) | ||
| 334 | )) | ||
| 325 | 335 | ||
| 326 | (defun rmail-make-basic-summary-line () | 336 | (defun rmail-make-basic-summary-line () |
| 327 | (goto-char (point-min)) | 337 | (goto-char (point-min)) |
| @@ -471,7 +481,8 @@ messages, or backward if NUMBER is negative." | |||
| 471 | non-del-msg-found))) | 481 | non-del-msg-found))) |
| 472 | (setq count (1- count)))) | 482 | (setq count (1- count)))) |
| 473 | (beginning-of-line) | 483 | (beginning-of-line) |
| 474 | (display-buffer rmail-buffer)) | 484 | (display-buffer rmail-view-buffer) |
| 485 | ) | ||
| 475 | 486 | ||
| 476 | (defun rmail-summary-previous-msg (&optional number) | 487 | (defun rmail-summary-previous-msg (&optional number) |
| 477 | (interactive "p") | 488 | (interactive "p") |
| @@ -687,6 +698,7 @@ Commands for sorting the summary: | |||
| 687 | (setq buffer-read-only t) | 698 | (setq buffer-read-only t) |
| 688 | (set-syntax-table text-mode-syntax-table) | 699 | (set-syntax-table text-mode-syntax-table) |
| 689 | (make-local-variable 'rmail-buffer) | 700 | (make-local-variable 'rmail-buffer) |
| 701 | (make-local-variable 'rmail-view-buffer) | ||
| 690 | (make-local-variable 'rmail-total-messages) | 702 | (make-local-variable 'rmail-total-messages) |
| 691 | (make-local-variable 'rmail-current-message) | 703 | (make-local-variable 'rmail-current-message) |
| 692 | (setq rmail-current-message nil) | 704 | (setq rmail-current-message nil) |
| @@ -739,7 +751,7 @@ Search, the `unseen' attribute is restored.") | |||
| 739 | (setq rmail-summary-put-back-unseen nil)) | 751 | (setq rmail-summary-put-back-unseen nil)) |
| 740 | 752 | ||
| 741 | (or (eq rmail-current-message msg-num) | 753 | (or (eq rmail-current-message msg-num) |
| 742 | (let ((window (get-buffer-window rmail-buffer)) | 754 | (let ((window (get-buffer-window rmail-view-buffer)) |
| 743 | (owin (selected-window))) | 755 | (owin (selected-window))) |
| 744 | (if isearch-mode | 756 | (if isearch-mode |
| 745 | (save-excursion | 757 | (save-excursion |
| @@ -1055,7 +1067,7 @@ advance to the next message." | |||
| 1055 | (interactive "P") | 1067 | (interactive "P") |
| 1056 | (if (eq dist '-) | 1068 | (if (eq dist '-) |
| 1057 | (rmail-summary-scroll-msg-down nil) | 1069 | (rmail-summary-scroll-msg-down nil) |
| 1058 | (let ((rmail-buffer-window (get-buffer-window rmail-buffer))) | 1070 | (let ((rmail-buffer-window (get-buffer-window rmail-view-buffer))) |
| 1059 | (if rmail-buffer-window | 1071 | (if rmail-buffer-window |
| 1060 | (if (let ((rmail-summary-window (selected-window))) | 1072 | (if (let ((rmail-summary-window (selected-window))) |
| 1061 | (select-window rmail-buffer-window) | 1073 | (select-window rmail-buffer-window) |
| @@ -1070,7 +1082,7 @@ advance to the next message." | |||
| 1070 | (if (not rmail-summary-scroll-between-messages) | 1082 | (if (not rmail-summary-scroll-between-messages) |
| 1071 | (error "End of buffer") | 1083 | (error "End of buffer") |
| 1072 | (rmail-summary-next-msg (or dist 1))) | 1084 | (rmail-summary-next-msg (or dist 1))) |
| 1073 | (let ((other-window-scroll-buffer rmail-buffer)) | 1085 | (let ((other-window-scroll-buffer rmail-view-buffer)) |
| 1074 | (scroll-other-window dist))) | 1086 | (scroll-other-window dist))) |
| 1075 | ;; If it isn't visible at all, show the beginning. | 1087 | ;; If it isn't visible at all, show the beginning. |
| 1076 | (rmail-summary-beginning-of-message))))) | 1088 | (rmail-summary-beginning-of-message))))) |