diff options
| author | Richard M. Stallman | 2005-07-03 16:29:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-07-03 16:29:14 +0000 |
| commit | 25774ab45902a94fa26679fa5aa7319bc086e33d (patch) | |
| tree | 225e677138a201b93a338c49080693702e2036a6 | |
| parent | 70903d8ef70353dea6b3e86c27eba52dffae3779 (diff) | |
| download | emacs-25774ab45902a94fa26679fa5aa7319bc086e33d.tar.gz emacs-25774ab45902a94fa26679fa5aa7319bc086e33d.zip | |
(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.
| -rw-r--r-- | lisp/mail/rmailsum.el | 34 |
1 files changed, 21 insertions, 13 deletions
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 @@ | |||
| 54 | ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. | 54 | ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. |
| 55 | "Additional expressions to highlight in Rmail Summary mode.") | 55 | "Additional expressions to highlight in Rmail Summary mode.") |
| 56 | 56 | ||
| 57 | (defvar rmail-summary-redo | ||
| 58 | "(FUNCTION . ARGS) to regenerate this Rmail summary buffer.") | ||
| 59 | |||
| 60 | (defvar rmail-summary-overlay nil) | ||
| 61 | (put 'rmail-summary-overlay 'permanent-local t) | ||
| 62 | |||
| 63 | (defvar rmail-summary-mode-map nil) | ||
| 64 | |||
| 57 | ;; Entry points for making a summary buffer. | 65 | ;; Entry points for making a summary buffer. |
| 58 | 66 | ||
| 59 | ;; Regenerate the contents of the summary | 67 | ;; Regenerate the contents of the summary |
| @@ -165,6 +173,8 @@ SENDERS is a string of names separated by commas." | |||
| 165 | 173 | ||
| 166 | (defvar rmail-summary-symbol-number 0) | 174 | (defvar rmail-summary-symbol-number 0) |
| 167 | 175 | ||
| 176 | (defvar rmail-new-summary-line-count) | ||
| 177 | |||
| 168 | (defun rmail-new-summary (description redo-form function &rest args) | 178 | (defun rmail-new-summary (description redo-form function &rest args) |
| 169 | "Create a summary of selected messages. | 179 | "Create a summary of selected messages. |
| 170 | DESCRIPTION makes part of the mode line of the summary buffer. | 180 | DESCRIPTION makes part of the mode line of the summary buffer. |
| @@ -187,7 +197,7 @@ nil for FUNCTION means all messages." | |||
| 187 | (setq mesg rmail-current-message) | 197 | (setq mesg rmail-current-message) |
| 188 | ;; Filter the messages; make or get their summary lines. | 198 | ;; Filter the messages; make or get their summary lines. |
| 189 | (let ((summary-msgs ()) | 199 | (let ((summary-msgs ()) |
| 190 | (new-summary-line-count 0)) | 200 | (rmail-new-summary-line-count 0)) |
| 191 | (let ((msgnum 1) | 201 | (let ((msgnum 1) |
| 192 | (buffer-read-only nil) | 202 | (buffer-read-only nil) |
| 193 | (old-min (point-min-marker)) | 203 | (old-min (point-min-marker)) |
| @@ -263,11 +273,11 @@ nil for FUNCTION means all messages." | |||
| 263 | (defun rmail-make-summary-line (msg) | 273 | (defun rmail-make-summary-line (msg) |
| 264 | (let ((line (or (aref rmail-summary-vector (1- msg)) | 274 | (let ((line (or (aref rmail-summary-vector (1- msg)) |
| 265 | (progn | 275 | (progn |
| 266 | (setq new-summary-line-count | 276 | (setq rmail-new-summary-line-count |
| 267 | (1+ new-summary-line-count)) | 277 | (1+ rmail-new-summary-line-count)) |
| 268 | (if (zerop (% new-summary-line-count 10)) | 278 | (if (zerop (% rmail-new-summary-line-count 10)) |
| 269 | (message "Computing summary lines...%d" | 279 | (message "Computing summary lines...%d" |
| 270 | new-summary-line-count)) | 280 | rmail-new-summary-line-count)) |
| 271 | (rmail-make-summary-line-1 msg))))) | 281 | (rmail-make-summary-line-1 msg))))) |
| 272 | ;; Fix up the part of the summary that says "deleted" or "unseen". | 282 | ;; Fix up the part of the summary that says "deleted" or "unseen". |
| 273 | (aset line 5 | 283 | (aset line 5 |
| @@ -842,8 +852,6 @@ Search, the `unseen' attribute is restored.") | |||
| 842 | (rmail-show-message msg-num t)))))) | 852 | (rmail-show-message msg-num t)))))) |
| 843 | (rmail-summary-update-highlight nil))))) | 853 | (rmail-summary-update-highlight nil))))) |
| 844 | 854 | ||
| 845 | (defvar rmail-summary-mode-map nil) | ||
| 846 | |||
| 847 | (if rmail-summary-mode-map | 855 | (if rmail-summary-mode-map |
| 848 | nil | 856 | nil |
| 849 | (setq rmail-summary-mode-map (make-keymap)) | 857 | (setq rmail-summary-mode-map (make-keymap)) |
| @@ -1037,9 +1045,6 @@ Search, the `unseen' attribute is restored.") | |||
| 1037 | (define-key rmail-summary-mode-map [menu-bar move next] | 1045 | (define-key rmail-summary-mode-map [menu-bar move next] |
| 1038 | '("Next" . rmail-summary-next-all)) | 1046 | '("Next" . rmail-summary-next-all)) |
| 1039 | 1047 | ||
| 1040 | (defvar rmail-summary-overlay nil) | ||
| 1041 | (put 'rmail-summary-overlay 'permanent-local t) | ||
| 1042 | |||
| 1043 | (defun rmail-summary-mouse-goto-message (event) | 1048 | (defun rmail-summary-mouse-goto-message (event) |
| 1044 | "Select the message whose summary line you click on." | 1049 | "Select the message whose summary line you click on." |
| 1045 | (interactive "@e") | 1050 | (interactive "@e") |
| @@ -1191,7 +1196,8 @@ move to the previous message." | |||
| 1191 | (or (eq buffer (window-buffer (next-window (frame-first-window)))) | 1196 | (or (eq buffer (window-buffer (next-window (frame-first-window)))) |
| 1192 | (delete-other-windows))) | 1197 | (delete-other-windows))) |
| 1193 | (pop-to-buffer rmail-view-buffer)) | 1198 | (pop-to-buffer rmail-view-buffer)) |
| 1194 | (beginning-of-buffer) | 1199 | (with-no-warnings |
| 1200 | (beginning-of-buffer)) | ||
| 1195 | (pop-to-buffer rmail-summary-buffer)) | 1201 | (pop-to-buffer rmail-summary-buffer)) |
| 1196 | 1202 | ||
| 1197 | (defun rmail-summary-bury () | 1203 | (defun rmail-summary-bury () |
| @@ -1275,12 +1281,14 @@ argument says to read a file name and use that file as the inbox." | |||
| 1275 | (defun rmail-summary-first-message () | 1281 | (defun rmail-summary-first-message () |
| 1276 | "Show first message in Rmail file from summary buffer." | 1282 | "Show first message in Rmail file from summary buffer." |
| 1277 | (interactive) | 1283 | (interactive) |
| 1278 | (beginning-of-buffer)) | 1284 | (with-no-warnings |
| 1285 | (beginning-of-buffer))) | ||
| 1279 | 1286 | ||
| 1280 | (defun rmail-summary-last-message () | 1287 | (defun rmail-summary-last-message () |
| 1281 | "Show last message in Rmail file from summary buffer." | 1288 | "Show last message in Rmail file from summary buffer." |
| 1282 | (interactive) | 1289 | (interactive) |
| 1283 | (end-of-buffer) | 1290 | (with-no-warnings |
| 1291 | (end-of-buffer)) | ||
| 1284 | (forward-line -1)) | 1292 | (forward-line -1)) |
| 1285 | 1293 | ||
| 1286 | (defvar rmail-summary-edit-map nil) | 1294 | (defvar rmail-summary-edit-map nil) |