diff options
author | Kenichi Handa <handa@m17n.org> | 1997-02-26 13:05:13 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-02-26 13:05:13 +0000 |
commit | db56d71e952c6a957aaa38cffd501ff1c2fd5315 (patch) | |
tree | 89185ad721830791568b7c8274351a255a7954a2 /lisp/mail/rmailsum.el | |
parent | 5350ad1dda5764b75ee962dd1b57a7dfa9988385 (diff) | |
download | emacs-db56d71e952c6a957aaa38cffd501ff1c2fd5315.tar.gz |
(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.
Diffstat (limited to 'lisp/mail/rmailsum.el')
-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." (setq rmail-summary-buffer nil) (save-excursion (let ((rbuf (current-buffer)) + (vbuf rmail-view-buffer) (total rmail-total-messages)) (set-buffer sumbuf) ;; Set up the summary buffer's contents. @@ -219,6 +220,7 @@ nil for FUNCTION means all messages." (make-local-variable 'minor-mode-alist) (setq minor-mode-alist (list (list t (concat ": " description)))) (setq rmail-buffer rbuf + rmail-view-buffer vbuf rmail-summary-redo redo-form rmail-total-messages total)))) (setq rmail-summary-buffer sumbuf)) @@ -264,6 +266,12 @@ nil for FUNCTION means all messages." ?\- ?\ ))) line)) +;;;###autoload +(defvar rmail-summary-line-decoder (function identity) + "*Function to decode summary-line. + +By default, `identity' is set.") + (defun rmail-make-summary-line-1 (msg) (goto-char (rmail-msgbeg msg)) (let* ((lim (save-excursion (forward-line 2) (point))) @@ -318,10 +326,12 @@ nil for FUNCTION means all messages." (insert "Summary-line: " line))) (setq pos (string-match "#" line)) (aset rmail-summary-vector (1- msg) - (concat (format "%4d " msg) - (substring line 0 pos) - labels - (substring line (1+ pos)))))) + (funcall rmail-summary-line-decoder + (concat (format "%4d " msg) + (substring line 0 pos) + labels + (substring line (1+ pos))))) + )) (defun rmail-make-basic-summary-line () (goto-char (point-min)) @@ -471,7 +481,8 @@ messages, or backward if NUMBER is negative." non-del-msg-found))) (setq count (1- count)))) (beginning-of-line) - (display-buffer rmail-buffer)) + (display-buffer rmail-view-buffer) + ) (defun rmail-summary-previous-msg (&optional number) (interactive "p") @@ -687,6 +698,7 @@ Commands for sorting the summary: (setq buffer-read-only t) (set-syntax-table text-mode-syntax-table) (make-local-variable 'rmail-buffer) + (make-local-variable 'rmail-view-buffer) (make-local-variable 'rmail-total-messages) (make-local-variable 'rmail-current-message) (setq rmail-current-message nil) @@ -739,7 +751,7 @@ Search, the `unseen' attribute is restored.") (setq rmail-summary-put-back-unseen nil)) (or (eq rmail-current-message msg-num) - (let ((window (get-buffer-window rmail-buffer)) + (let ((window (get-buffer-window rmail-view-buffer)) (owin (selected-window))) (if isearch-mode (save-excursion @@ -1055,7 +1067,7 @@ advance to the next message." (interactive "P") (if (eq dist '-) (rmail-summary-scroll-msg-down nil) - (let ((rmail-buffer-window (get-buffer-window rmail-buffer))) + (let ((rmail-buffer-window (get-buffer-window rmail-view-buffer))) (if rmail-buffer-window (if (let ((rmail-summary-window (selected-window))) (select-window rmail-buffer-window) @@ -1070,7 +1082,7 @@ advance to the next message." (if (not rmail-summary-scroll-between-messages) (error "End of buffer") (rmail-summary-next-msg (or dist 1))) - (let ((other-window-scroll-buffer rmail-buffer)) + (let ((other-window-scroll-buffer rmail-view-buffer)) (scroll-other-window dist))) ;; If it isn't visible at all, show the beginning. (rmail-summary-beginning-of-message))))) |