Commit 56b25713 authored by Karl Heuer's avatar Karl Heuer

Fix previous change.

parent 9ed287b0
...@@ -51,7 +51,9 @@ to return to regular RMAIL: ...@@ -51,7 +51,9 @@ to return to regular RMAIL:
(setq mode-line-modified (default-value 'mode-line-modified)) (setq mode-line-modified (default-value 'mode-line-modified))
(setq mode-line-format (default-value 'mode-line-format))) (setq mode-line-format (default-value 'mode-line-format)))
(if (rmail-summary-exists) (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)) (run-hooks 'text-mode-hook 'rmail-edit-mode-hook))
(defun rmail-edit-current-message () (defun rmail-edit-current-message ()
...@@ -74,7 +76,9 @@ to return to regular RMAIL: ...@@ -74,7 +76,9 @@ to return to regular RMAIL:
"Finish editing message; switch back to Rmail proper." "Finish editing message; switch back to Rmail proper."
(interactive) (interactive)
(if (rmail-summary-exists) (if (rmail-summary-exists)
(rmail-summary-enable)) (save-excursion
(set-buffer rmail-summary-buffer)
(rmail-summary-enable)))
;; Make sure buffer ends with a newline. ;; Make sure buffer ends with a newline.
(save-excursion (save-excursion
(goto-char (point-max)) (goto-char (point-max))
......
...@@ -531,18 +531,14 @@ Commands for sorting the summary: ...@@ -531,18 +531,14 @@ Commands for sorting the summary:
;; Summary features need to be disabled during edit mode. ;; Summary features need to be disabled during edit mode.
(defun rmail-summary-disable () (defun rmail-summary-disable ()
(save-excursion (use-local-map text-mode-map)
(set-buffer rmail-summary-buffer) (remove-hook 'post-command-hook 'rmail-summary-rmail-update)
(use-local-map text-mode-map) (setq revert-buffer-function nil))
(remove-hook 'post-command-hook 'rmail-summary-rmail-update)
(setq revert-buffer-function nil)))
(defun rmail-summary-enable () (defun rmail-summary-enable ()
(save-excursion (use-local-map rmail-summary-mode-map)
(set-buffer rmail-summary-buffer) (add-hook 'post-command-hook 'rmail-summary-rmail-update)
(use-local-map rmail-summary-mode-map) (setq revert-buffer-function 'rmail-update-summary))
(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, ;; Show in Rmail the message described by the summary line that point is on,
;; but only if the Rmail buffer is already visible. ;; but only if the Rmail buffer is already visible.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment