summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-05-27 21:06:10 +0000
committerRichard M. Stallman <rms@gnu.org>1998-05-27 21:06:10 +0000
commit77fb89636c5edaafa99a3cda6757b05dc2bb4541 (patch)
tree5d48e64ae82901191dddfb75562df9a7fb3cedec /lisp/mail
parent903e09b79c08641ff7c51c5b76e2c218f8eea20a (diff)
downloademacs-77fb89636c5edaafa99a3cda6757b05dc2bb4541.tar.gz
(rmail-old-pruned): New permanent local.
(rmail-edit-current-message): Set rmail-old-pruned, then display full headers. (rmail-cease-edit): rmail-old-pruned controls whether to prune headers.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmailedit.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 8f5a65a9b59..4fee4f848a2 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -61,10 +61,16 @@ to return to regular RMAIL:
(rmail-summary-disable)))
(run-hooks 'rmail-edit-mode-hook))
+(defvar rmail-old-pruned nil)
+(put 'rmail-old-pruned 'permanent-local t)
+
;;;###autoload
(defun rmail-edit-current-message ()
"Edit the contents of this message."
(interactive)
+ (make-local-variable 'rmail-old-pruned)
+ (setq rmail-old-pruned (rmail-msg-is-pruned))
+ (rmail-toggle-header 0)
(rmail-edit-mode)
(make-local-variable 'rmail-old-text)
(setq rmail-old-text (buffer-substring (point-min) (point-max)))
@@ -74,7 +80,7 @@ to return to regular RMAIL:
(eq (key-binding "\C-c\C-]") 'rmail-abort-edit))
(message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort")
(message "%s" (substitute-command-keys
- "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort"))))
+ "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort"))))
(defun rmail-cease-edit ()
"Finish editing message; switch back to Rmail proper."
@@ -114,7 +120,8 @@ to return to regular RMAIL:
(progn (forward-line 1)
(point))))))))))))
(save-excursion
- (rmail-show-message)))
+ (rmail-show-message)
+ (rmail-toggle-header (if rmail-old-pruned 1 0))))
(setq buffer-read-only t))
(defun rmail-abort-edit ()