Function: rmail-new-summary
rmail-new-summary is a byte-compiled function defined in
rmailsum.el.gz.
Signature
(rmail-new-summary DESC REDO FUNCTION &rest ARGS)
Documentation
Create a summary of selected messages.
DESC makes part of the mode line of the summary buffer.
REDO is what to put in rmail-summary-redo; usually
its car is the function that called rmail-new-summary
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.
This function has :after advice: hrmail--highlight-buttons.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmailsum.el.gz
(defun rmail-new-summary (desc redo function &rest args)
"Create a summary of selected messages.
DESC makes part of the mode line of the summary buffer.
REDO is what to put in `rmail-summary-redo'; usually
its car is the function that called `rmail-new-summary'
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...")
(unless rmail-buffer
(error "No RMAIL buffer found"))
(let (mesg was-in-summary sumbuf)
(if (derived-mode-p 'rmail-summary-mode)
(setq was-in-summary t))
(with-current-buffer rmail-buffer
(setq rmail-summary-buffer (rmail-new-summary-1 desc redo function args)
;; r-s-b is buffer-local.
sumbuf rmail-summary-buffer
mesg rmail-current-message))
;; Now display the summary buffer and go to the right place in it.
(unless was-in-summary
(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)))
(rmail-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)))
(rmail-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)
(set-buffer sumbuf))
(rmail-summary-goto-msg mesg t t)
(rmail-summary-construct-io-menu)
(message "Computing summary lines...done")))