changeset 17096:4a2d9b3990e3

(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.
author Kenichi Handa <handa@m17n.org>
date Wed, 26 Feb 1997 13:05:13 +0000
parents b57415dcc114
children c3c90aba16f9
files lisp/mail/rmailsum.el
diffstat 1 files changed, 20 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Wed Feb 26 13:03:20 1997 +0000
+++ b/lisp/mail/rmailsum.el	Wed Feb 26 13:05:13 1997 +0000
@@ -204,6 +204,7 @@
 	(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 @@
 	    (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 @@
 		?\- ?\ )))
     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 @@
 	  (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 @@
 				      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 @@
   (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 @@
 	    (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 @@
   (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 @@
 	      (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)))))