diff options
| author | Richard M. Stallman | 1998-05-27 21:06:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-27 21:06:10 +0000 |
| commit | 77fb89636c5edaafa99a3cda6757b05dc2bb4541 (patch) | |
| tree | 5d48e64ae82901191dddfb75562df9a7fb3cedec | |
| parent | 903e09b79c08641ff7c51c5b76e2c218f8eea20a (diff) | |
| download | emacs-77fb89636c5edaafa99a3cda6757b05dc2bb4541.tar.gz emacs-77fb89636c5edaafa99a3cda6757b05dc2bb4541.zip | |
(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.
| -rw-r--r-- | lisp/mail/rmailedit.el | 11 |
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: | |||
| 61 | (rmail-summary-disable))) | 61 | (rmail-summary-disable))) |
| 62 | (run-hooks 'rmail-edit-mode-hook)) | 62 | (run-hooks 'rmail-edit-mode-hook)) |
| 63 | 63 | ||
| 64 | (defvar rmail-old-pruned nil) | ||
| 65 | (put 'rmail-old-pruned 'permanent-local t) | ||
| 66 | |||
| 64 | ;;;###autoload | 67 | ;;;###autoload |
| 65 | (defun rmail-edit-current-message () | 68 | (defun rmail-edit-current-message () |
| 66 | "Edit the contents of this message." | 69 | "Edit the contents of this message." |
| 67 | (interactive) | 70 | (interactive) |
| 71 | (make-local-variable 'rmail-old-pruned) | ||
| 72 | (setq rmail-old-pruned (rmail-msg-is-pruned)) | ||
| 73 | (rmail-toggle-header 0) | ||
| 68 | (rmail-edit-mode) | 74 | (rmail-edit-mode) |
| 69 | (make-local-variable 'rmail-old-text) | 75 | (make-local-variable 'rmail-old-text) |
| 70 | (setq rmail-old-text (buffer-substring (point-min) (point-max))) | 76 | (setq rmail-old-text (buffer-substring (point-min) (point-max))) |
| @@ -74,7 +80,7 @@ to return to regular RMAIL: | |||
| 74 | (eq (key-binding "\C-c\C-]") 'rmail-abort-edit)) | 80 | (eq (key-binding "\C-c\C-]") 'rmail-abort-edit)) |
| 75 | (message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort") | 81 | (message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort") |
| 76 | (message "%s" (substitute-command-keys | 82 | (message "%s" (substitute-command-keys |
| 77 | "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort")))) | 83 | "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort")))) |
| 78 | 84 | ||
| 79 | (defun rmail-cease-edit () | 85 | (defun rmail-cease-edit () |
| 80 | "Finish editing message; switch back to Rmail proper." | 86 | "Finish editing message; switch back to Rmail proper." |
| @@ -114,7 +120,8 @@ to return to regular RMAIL: | |||
| 114 | (progn (forward-line 1) | 120 | (progn (forward-line 1) |
| 115 | (point)))))))))))) | 121 | (point)))))))))))) |
| 116 | (save-excursion | 122 | (save-excursion |
| 117 | (rmail-show-message))) | 123 | (rmail-show-message) |
| 124 | (rmail-toggle-header (if rmail-old-pruned 1 0)))) | ||
| 118 | (setq buffer-read-only t)) | 125 | (setq buffer-read-only t)) |
| 119 | 126 | ||
| 120 | (defun rmail-abort-edit () | 127 | (defun rmail-abort-edit () |