changeset 11175:025aeb70cfed

(rmail-summary-toggle-header): Make header visible in message buffer.
author Richard M. Stallman <rms@gnu.org>
date Fri, 31 Mar 1995 19:36:02 +0000
parents b400b109a398
children 07a3b9c34717
files lisp/mail/rmailsum.el
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Fri Mar 31 19:26:53 1995 +0000
+++ b/lisp/mail/rmailsum.el	Fri Mar 31 19:36:02 1995 +0000
@@ -1155,7 +1155,19 @@
   (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.