1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(rmail-select-summary): Preserve rmail buffer's value of

rmail-total-messages even while summary buffer is current.
This commit is contained in:
Richard M. Stallman 1994-08-04 22:33:36 +00:00
parent 285cdf4e20
commit a05fc4d9f1

View file

@ -200,18 +200,25 @@ Called with region narrowed to the message, including headers.")
;; Perform BODY in the summary buffer
;; in such a way that its cursor is properly updated in its own window.
(defmacro rmail-select-summary (&rest body)
(` (progn (if (rmail-summary-displayed)
(let ((window (selected-window)))
(save-excursion
(unwind-protect
(progn
(pop-to-buffer rmail-summary-buffer)
(,@ body))
(select-window window))))
(save-excursion
(set-buffer rmail-summary-buffer)
(progn (,@ body))))
(rmail-maybe-display-summary))))
(` (let ((total rmail-total-messages))
(if (rmail-summary-displayed)
(let ((window (selected-window)))
(save-excursion
(unwind-protect
(progn
(pop-to-buffer rmail-summary-buffer)
;; rmail-total-messages is a buffer-local var
;; in the rmail buffer.
;; This way we make it available for the body
;; even tho the rmail buffer is not current.
(let ((rmail-total-messages total))
(,@ body)))
(select-window window))))
(save-excursion
(set-buffer rmail-summary-buffer)
(let ((rmail-total-messages total))
(,@ body))))
(rmail-maybe-display-summary))))
;;;; *** Rmail Mode ***