From 387f203c002d4dcef2999cba91428debff161df6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 31 Mar 1995 19:36:02 +0000 Subject: [PATCH] (rmail-summary-toggle-header): Make header visible in message buffer. --- lisp/mail/rmailsum.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 76a31c1f0a4..49b702143a9 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -1155,7 +1155,19 @@ Interactively, empty argument means use same regexp used last time." (interactive) (save-excursion (set-buffer rmail-buffer) - (rmail-toggle-header))) + (rmail-toggle-header)) + ;; Inside save-excursion, some changes to point in the RMAIL buffer are lost. + ;; Set point to point-min in the RMAIL buffer, if it is visible. + (let ((window (get-buffer-window rmail-buffer))) + (if window + ;; Using save-window-excursion would lose the new value of point. + (let ((owin (selected-window))) + (unwind-protect + (progn + (select-window window) + (goto-char (point-min))) + (select-window owin)))))) + (defun rmail-summary-add-label (label) "Add LABEL to labels associated with current Rmail message. -- 2.39.5