diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-07-13 22:04:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-07-13 22:04:35 +0000 |
commit | 7c968ca53e3a9a84cb152ad2231e98ae2462009d (patch) | |
tree | 12b1622d784503e8f9ff741992cd5226f29de177 /lisp | |
parent | 200127fd0dbc55febfc53339dd440f64c5cd8b86 (diff) | |
download | emacs-7c968ca53e3a9a84cb152ad2231e98ae2462009d.tar.gz emacs-7c968ca53e3a9a84cb152ad2231e98ae2462009d.tar.bz2 emacs-7c968ca53e3a9a84cb152ad2231e98ae2462009d.zip |
(rmail-edit-current-message, rmail-cease-edit):
Save and restore save-buffer-coding-system in another local variable.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mail/rmailedit.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 4fee4f848a2..76994d4fb61 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -64,14 +64,23 @@ to return to regular RMAIL: (defvar rmail-old-pruned nil) (put 'rmail-old-pruned 'permanent-local t) +(defvar rmail-edit-saved-coding-system nil) +(put 'rmail-edit-saved-coding-system '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)) + (make-local-variable 'rmail-edit-saved-coding-system) + (setq rmail-edit-saved-coding-system save-buffer-coding-system) (rmail-toggle-header 0) (rmail-edit-mode) + ;; As the local value of save-buffer-coding-system is deleted by + ;; rmail-edit-mode, we restore the original value. + (make-local-variable 'save-buffer-coding-system) + (setq save-buffer-coding-system rmail-edit-saved-coding-system) (make-local-variable 'rmail-old-text) (setq rmail-old-text (buffer-substring (point-min) (point-max))) (setq buffer-read-only nil) @@ -102,6 +111,9 @@ to return to regular RMAIL: (kill-all-local-variables) (rmail-mode-1) (rmail-variables) + ;; As the local value of save-buffer-coding-system is changed by + ;; rmail-variables, we restore the original value. + (setq save-buffer-coding-system rmail-edit-saved-coding-system) (if (and (= (length old) (- (point-max) (point-min))) (string= old (buffer-substring (point-min) (point-max)))) () |