From: Richard M. Stallman Date: Sun, 3 Jul 2005 16:29:14 +0000 (+0000) Subject: (rmail-summary-redo): Add defvar. X-Git-Tag: emacs-pretest-22.0.90~8493 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=25774ab45902a94fa26679fa5aa7319bc086e33d;p=emacs.git (rmail-summary-redo): Add defvar. (rmail-summary-mode-map, rmail-summary-overlay): Defvars moved up. (rmail-new-summary-line-count): Renamed from new-summary-line-count. Add defvar. (rmail-summary-beginning-of-message): Use with-no-warnings. (rmail-summary-first-message, rmail-summary-last-message): Likewise. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 9c647126d5c..5bf6af743b3 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -54,6 +54,14 @@ ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. "Additional expressions to highlight in Rmail Summary mode.") +(defvar rmail-summary-redo + "(FUNCTION . ARGS) to regenerate this Rmail summary buffer.") + +(defvar rmail-summary-overlay nil) +(put 'rmail-summary-overlay 'permanent-local t) + +(defvar rmail-summary-mode-map nil) + ;; Entry points for making a summary buffer. ;; Regenerate the contents of the summary @@ -165,6 +173,8 @@ SENDERS is a string of names separated by commas." (defvar rmail-summary-symbol-number 0) +(defvar rmail-new-summary-line-count) + (defun rmail-new-summary (description redo-form function &rest args) "Create a summary of selected messages. DESCRIPTION makes part of the mode line of the summary buffer. @@ -187,7 +197,7 @@ nil for FUNCTION means all messages." (setq mesg rmail-current-message) ;; Filter the messages; make or get their summary lines. (let ((summary-msgs ()) - (new-summary-line-count 0)) + (rmail-new-summary-line-count 0)) (let ((msgnum 1) (buffer-read-only nil) (old-min (point-min-marker)) @@ -263,11 +273,11 @@ nil for FUNCTION means all messages." (defun rmail-make-summary-line (msg) (let ((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)) + (setq rmail-new-summary-line-count + (1+ rmail-new-summary-line-count)) + (if (zerop (% rmail-new-summary-line-count 10)) (message "Computing summary lines...%d" - new-summary-line-count)) + rmail-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 @@ -842,8 +852,6 @@ Search, the `unseen' attribute is restored.") (rmail-show-message msg-num t)))))) (rmail-summary-update-highlight nil))))) -(defvar rmail-summary-mode-map nil) - (if rmail-summary-mode-map nil (setq rmail-summary-mode-map (make-keymap)) @@ -1037,9 +1045,6 @@ Search, the `unseen' attribute is restored.") (define-key rmail-summary-mode-map [menu-bar move next] '("Next" . rmail-summary-next-all)) -(defvar rmail-summary-overlay nil) -(put 'rmail-summary-overlay 'permanent-local t) - (defun rmail-summary-mouse-goto-message (event) "Select the message whose summary line you click on." (interactive "@e") @@ -1191,7 +1196,8 @@ move to the previous message." (or (eq buffer (window-buffer (next-window (frame-first-window)))) (delete-other-windows))) (pop-to-buffer rmail-view-buffer)) - (beginning-of-buffer) + (with-no-warnings + (beginning-of-buffer)) (pop-to-buffer rmail-summary-buffer)) (defun rmail-summary-bury () @@ -1275,12 +1281,14 @@ argument says to read a file name and use that file as the inbox." (defun rmail-summary-first-message () "Show first message in Rmail file from summary buffer." (interactive) - (beginning-of-buffer)) + (with-no-warnings + (beginning-of-buffer))) (defun rmail-summary-last-message () "Show last message in Rmail file from summary buffer." (interactive) - (end-of-buffer) + (with-no-warnings + (end-of-buffer)) (forward-line -1)) (defvar rmail-summary-edit-map nil)