Function: mh-make-folder-mode-line
mh-make-folder-mode-line is an autoloaded and byte-compiled function
defined in mh-folder.el.gz.
Signature
(mh-make-folder-mode-line &optional IGNORED)
Documentation
Set the fields of the mode line for a folder buffer.
The optional argument is now obsolete and IGNORED. It used to be
used to pass in what is now stored in the buffer-local variable
mh-mode-line-annotation.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-folder.el.gz
;;;###mh-autoload
(defun mh-make-folder-mode-line (&optional _ignored)
"Set the fields of the mode line for a folder buffer.
The optional argument is now obsolete and IGNORED. It used to be
used to pass in what is now stored in the buffer-local variable
`mh-mode-line-annotation'."
(save-excursion
(save-window-excursion
(mh-first-msg)
(let ((new-first-msg-num (mh-get-msg-num nil)))
(when (or (not (memq 'unthread mh-view-ops))
(null mh-first-msg-num)
(null new-first-msg-num)
(< new-first-msg-num mh-first-msg-num))
(setq mh-first-msg-num new-first-msg-num)))
(mh-last-msg)
(let ((new-last-msg-num (mh-get-msg-num nil)))
(when (or (not (memq 'unthread mh-view-ops))
(null mh-last-msg-num)
(null new-last-msg-num)
(> new-last-msg-num mh-last-msg-num))
(setq mh-last-msg-num new-last-msg-num)))
(setq mh-msg-count (if mh-first-msg-num
(count-lines (point-min) (point-max))
0))
(setq mode-line-buffer-identification
(list (format " {%%b%s} %s msg%s"
(if mh-mode-line-annotation
(format "/%s" mh-mode-line-annotation)
"")
(if (zerop mh-msg-count)
"no"
(format "%d" mh-msg-count))
(if (zerop mh-msg-count)
"s"
(cond ((> mh-msg-count 1)
(format "s (%d-%d)" mh-first-msg-num
mh-last-msg-num))
(mh-first-msg-num
(format " (%d)" mh-first-msg-num))
(""))))))
(mh-logo-display))))