* mail/rmailsum.el (rmail-new-summary, rmail-new-summary-1):

Doc fixes, rename args.
This commit is contained in:
Richard M. Stallman 2013-05-05 10:08:50 -04:00
parent 0dc04f4210
commit df8f35df4a
2 changed files with 17 additions and 10 deletions

View file

@ -4,6 +4,9 @@
Detect empty summary and don't change selected message. Detect empty summary and don't change selected message.
(rmail-summary-goto-msg): Likewise. (rmail-summary-goto-msg): Likewise.
* mail/rmailsum.el (rmail-new-summary, rmail-new-summary-1):
Doc fixes, rename args.
2013-05-05 Alan Mackenzie <acm@muc.de> 2013-05-05 Alan Mackenzie <acm@muc.de>
* progmodes/cc-defs.el (c-version): Increment to 5.32.5. * progmodes/cc-defs.el (c-version): Increment to 5.32.5.

View file

@ -394,12 +394,16 @@ SENDERS is a string of regexps separated by commas."
(defvar rmail-new-summary-line-count) (defvar rmail-new-summary-line-count)
(defun rmail-new-summary (desc redo func &rest args) (defun rmail-new-summary (desc redo function &rest args)
"Create a summary of selected messages. "Create a summary of selected messages.
DESC makes part of the mode line of the summary buffer. REDO is form ... DESC makes part of the mode line of the summary buffer.
For each message, FUNC is applied to the message number and ARGS... REDO is what to put in `rmail-summary-redo'; usually
and if the result is non-nil, that message is included. its car is the function that called `rmail-new-summary'
nil for FUNCTION means all messages." and its cdr is the arguments passed to that function.
For each message, applies FUNCTION to the message number and ARGS...,
and if the result is non-nil, it includes that message in the summary.
If FUNCTION is nil, includes all messages."
(message "Computing summary lines...") (message "Computing summary lines...")
(unless rmail-buffer (unless rmail-buffer
(error "No RMAIL buffer found")) (error "No RMAIL buffer found"))
@ -407,7 +411,7 @@ nil for FUNCTION means all messages."
(if (eq major-mode 'rmail-summary-mode) (if (eq major-mode 'rmail-summary-mode)
(setq was-in-summary t)) (setq was-in-summary t))
(with-current-buffer rmail-buffer (with-current-buffer rmail-buffer
(setq rmail-summary-buffer (rmail-new-summary-1 desc redo func args) (setq rmail-summary-buffer (rmail-new-summary-1 desc redo function args)
;; r-s-b is buffer-local. ;; r-s-b is buffer-local.
sumbuf rmail-summary-buffer sumbuf rmail-summary-buffer
mesg rmail-current-message)) mesg rmail-current-message))
@ -435,14 +439,14 @@ nil for FUNCTION means all messages."
(rmail-summary-construct-io-menu) (rmail-summary-construct-io-menu)
(message "Computing summary lines...done"))) (message "Computing summary lines...done")))
(defun rmail-new-summary-1 (description form function args) (defun rmail-new-summary-1 (description redo function args)
"Filter messages to obtain summary lines. "Filter messages to obtain summary lines.
DESCRIPTION is added to the mode line. DESCRIPTION is added to the mode line.
Return the summary buffer by invoking FUNCTION on each message Return the summary buffer by invoking FUNCTION on each message
passing the message number and ARGS... passing the message number and ARGS.
REDO is a form ... REDO is what to put in `rmail-summary-redo'.
The current buffer must be a Rmail buffer either containing a The current buffer must be a Rmail buffer either containing a
collection of mbox formatted messages or displaying a single collection of mbox formatted messages or displaying a single
@ -511,7 +515,7 @@ message."
(make-local-variable 'minor-mode-alist) (make-local-variable 'minor-mode-alist)
(setq minor-mode-alist (list (list t (concat ": " description)))) (setq minor-mode-alist (list (list t (concat ": " description))))
(setq rmail-buffer rbuf (setq rmail-buffer rbuf
rmail-summary-redo form rmail-summary-redo redo
rmail-total-messages total))) rmail-total-messages total)))
sumbuf)) sumbuf))