From: Richard M. Stallman Date: Mon, 27 Sep 2004 07:41:45 +0000 (+0000) Subject: (rmail-make-summary-line): Function deleted. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=262b5bf92f95347bd6863c72026f899e3c58c062;p=emacs.git (rmail-make-summary-line): Function deleted. (rmail-new-summary): Make it work once again as in old version. (rmail-summary-get-summary): Call rmail-summary-line-decoder. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 36bd93208c4..b20604fa261 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-09-27 Richard M. Stallman + + * mail/rmailsum.el (rmail-make-summary-line): Function deleted. + (rmail-new-summary): Make it work once again as in old version. + (rmail-summary-get-summary): Call rmail-summary-line-decoder. + 2004-09-20 Richard M. Stallman * mail/rmail.el (rmail): Error if file is Babyl format. diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index d93c03e2da2..698eff4b4b3 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -203,103 +203,84 @@ nil for FUNCTION means all messages." (new-summary-line-count 0) (msgnum 1) current-message sumbuf was-in-summary) - - ;; Go to the Rmail buffer. - (if (eq major-mode 'rmail-summary-mode) - (progn - (setq was-in-summary t) - (set-buffer rmail-buffer))) - - ;; Find its summary buffer, or make one. - (setq current-message rmail-current-message - sumbuf - (if (and rmail-summary-buffer - (buffer-name rmail-summary-buffer)) - rmail-summary-buffer - (generate-new-buffer (concat (buffer-name) "-summary")))) - - ;; Collect the message summaries based on the filtering - ;; argument (FUNCTION). - (while (>= rmail-total-messages msgnum) - (if (or (null function) - (apply function (cons msgnum args))) - (setq summary-msgs - (cons (cons msgnum (rmail-summary-get-summary msgnum)) - summary-msgs))) - (setq msgnum (1+ msgnum))) - (setq summary-msgs (nreverse summary-msgs)) - - ;; Place the collected summaries into the summary buffer. - (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. - (let ((buffer-read-only nil)) - (erase-buffer) - (while summary-msgs - (princ (cdr (car summary-msgs)) sumbuf) - (setq summary-msgs (cdr summary-msgs))) - (goto-char (point-min))) - ;; Set up the rest of its state and local variables. - (setq buffer-read-only t) - (rmail-summary-mode) - (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 - rmail-current-message current-message))) - (setq rmail-summary-buffer sumbuf) - - (set-buffer rmail-summary-buffer) - (rmail-summary-goto-msg current-message nil t) - (rmail-summary-construct-io-menu) + + ;; Go to the Rmail buffer. + (if (eq major-mode 'rmail-summary-mode) + (setq was-in-summary t)) + (set-buffer rmail-buffer) + + ;; Find its summary buffer, or make one. + (setq current-message rmail-current-message + sumbuf + (if (and rmail-summary-buffer + (buffer-name rmail-summary-buffer)) + rmail-summary-buffer + (generate-new-buffer (concat (buffer-name) "-summary")))) + + ;; Collect the message summaries based on the filtering + ;; argument (FUNCTION). + (while (>= rmail-total-messages msgnum) + (if (or (null function) + (apply function (cons msgnum args))) + (setq summary-msgs + (cons (cons msgnum (rmail-summary-get-summary msgnum)) + summary-msgs))) + (setq msgnum (1+ msgnum))) + (setq summary-msgs (nreverse summary-msgs)) + + ;; Place the collected summaries into the summary buffer. + (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. + (let ((buffer-read-only nil)) + (erase-buffer) + (while summary-msgs + (princ (cdr (car summary-msgs)) sumbuf) + (setq summary-msgs (cdr summary-msgs))) + (goto-char (point-min))) + ;; Set up the rest of its state and local variables. + (setq buffer-read-only t) + (rmail-summary-mode) + (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 + rmail-current-message current-message))) + (setq rmail-summary-buffer sumbuf)) ;; Now display the summary buffer and go to the right place in it. (or was-in-summary - (progn - (if (and (one-window-p) - pop-up-windows (not pop-up-frames)) - ;; If there is just one window, put the summary on the top. - (progn - (split-window (selected-window) rmail-summary-window-size) - (select-window (next-window (frame-first-window))) - (pop-to-buffer sumbuf) - ;; If pop-to-buffer did not use that window, delete that - ;; window. (This can happen if it uses another frame.) - (if (not (eq sumbuf (window-buffer (frame-first-window)))) - (delete-other-windows)))) - ;;(pop-to-buffer sumbuf)) - (set-buffer rmail-buffer) - ;; This is how rmail makes the summary buffer reappear. - ;; We do this here to make the window the proper size. - (rmail-select-summary nil))) + (progn + (if (and (one-window-p) + pop-up-windows (not pop-up-frames)) + ;; If there is just one window, put the summary on the top. + (progn + (split-window (selected-window) rmail-summary-window-size) + (select-window (next-window (frame-first-window))) + (pop-to-buffer sumbuf) + ;; If pop-to-buffer did not use that window, delete that + ;; window. (This can happen if it uses another frame.) + (if (not (eq sumbuf (window-buffer (frame-first-window)))) + (delete-other-windows))) + (pop-to-buffer sumbuf)) + (set-buffer rmail-buffer) + ;; This is how rmail makes the summary buffer reappear. + ;; We do this here to make the window the proper size. + (rmail-select-summary nil))) + + (rmail-summary-goto-msg current-message nil t) + (rmail-summary-construct-io-menu) (message "Computing summary lines...done"))) ;;;; Low levels of generating a summary. -;;; mbox: deprecated -(defun rmail-make-summary-line (msg) - (let* ((new-summary-line-count 0) - (line (or (aref rmail-summary-vector (1- msg)) - (progn - (setq new-summary-line-count - (1+ new-summary-line-count)) - (if (zerop (% new-summary-line-count 10)) - (message "Computing summary lines...%d" - new-summary-line-count)) - (rmail-make-summary-line-1 msg))))) - ;; Fix up the part of the summary that says "deleted" or "unseen". - (aset line 5 - (if (rmail-message-deleted-p msg) ?\D - (if (= ?0 (char-after (+ 3 (rmail-msgbeg msg)))) - ?\- ?\ ))) - line)) - ;;;###autoload (defcustom rmail-summary-line-decoder (function identity) "*Function to decode summary-line. @@ -1672,14 +1653,15 @@ KEYWORDS is a comma-separated list of labels." (defun rmail-summary-get-summary (n) "Return a summary line for message N." - (format "%4s%s%6s %25s %s %s\n" - n - (rmail-summary-get-summary-attributes n) - (concat (rmail-desc-get-day-number n) "-" - (rmail-desc-get-month n)) - (rmail-desc-get-sender n) - (rmail-summary-get-line-count n) - (rmail-desc-get-subject n))) + (funcall rmail-summary-line-decoder + (format "%4s%s%6s %25s %s %s\n" + n + (rmail-summary-get-summary-attributes n) + (concat (rmail-desc-get-day-number n) "-" + (rmail-desc-get-month n)) + (rmail-desc-get-sender n) + (rmail-summary-get-line-count n) + (rmail-desc-get-subject n)))) (defun rmail-summary-update-attribute (attr-index n) "Update the attribute denoted by ATTR-INDEX in message N."