]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix previous change.
authorKarl Heuer <kwzh@gnu.org>
Thu, 7 Apr 1994 07:26:49 +0000 (07:26 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 7 Apr 1994 07:26:49 +0000 (07:26 +0000)
lisp/mail/rmailedit.el
lisp/mail/rmailsum.el

index 9d084d0aeebddf412e48d10640480f9d1c29a360..5725ce4f64d924b70ad48e956f852836b1e2be15 100644 (file)
@@ -51,7 +51,9 @@ to return to regular RMAIL:
       (setq mode-line-modified (default-value 'mode-line-modified))
     (setq mode-line-format (default-value 'mode-line-format)))
   (if (rmail-summary-exists)
-      (rmail-summary-disable))
+      (save-excursion
+       (set-buffer rmail-summary-buffer)
+       (rmail-summary-disable)))
   (run-hooks 'text-mode-hook 'rmail-edit-mode-hook))
 
 (defun rmail-edit-current-message ()
@@ -74,7 +76,9 @@ to return to regular RMAIL:
   "Finish editing message; switch back to Rmail proper."
   (interactive)
   (if (rmail-summary-exists)
-      (rmail-summary-enable))
+      (save-excursion
+       (set-buffer rmail-summary-buffer)
+       (rmail-summary-enable)))
   ;; Make sure buffer ends with a newline.
   (save-excursion
     (goto-char (point-max))
index a8428e065b572e04d103b25201a97e7425cffa3d..3584c9cfad25c80cd5ec5bf2df8206970f0981a0 100644 (file)
@@ -531,18 +531,14 @@ Commands for sorting the summary:
 
 ;; Summary features need to be disabled during edit mode.
 (defun rmail-summary-disable ()
-  (save-excursion
-    (set-buffer rmail-summary-buffer)
-    (use-local-map text-mode-map)
-    (remove-hook 'post-command-hook 'rmail-summary-rmail-update)
-    (setq revert-buffer-function nil)))
+  (use-local-map text-mode-map)
+  (remove-hook 'post-command-hook 'rmail-summary-rmail-update)
+  (setq revert-buffer-function nil))
 
 (defun rmail-summary-enable ()
-  (save-excursion
-    (set-buffer rmail-summary-buffer)
-    (use-local-map rmail-summary-mode-map)
-    (add-hook 'post-command-hook 'rmail-summary-rmail-update)
-    (setq revert-buffer-function 'rmail-update-summary)))
+  (use-local-map rmail-summary-mode-map)
+  (add-hook 'post-command-hook 'rmail-summary-rmail-update)
+  (setq revert-buffer-function 'rmail-update-summary))
 
 ;; Show in Rmail the message described by the summary line that point is on,
 ;; but only if the Rmail buffer is already visible.