aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-07-13 22:04:35 +0000
committerRichard M. Stallman1998-07-13 22:04:35 +0000
commit7c968ca53e3a9a84cb152ad2231e98ae2462009d (patch)
tree12b1622d784503e8f9ff741992cd5226f29de177
parent200127fd0dbc55febfc53339dd440f64c5cd8b86 (diff)
downloademacs-7c968ca53e3a9a84cb152ad2231e98ae2462009d.tar.gz
emacs-7c968ca53e3a9a84cb152ad2231e98ae2462009d.zip
(rmail-edit-current-message, rmail-cease-edit):
Save and restore save-buffer-coding-system in another local variable.
-rw-r--r--lisp/mail/rmailedit.el12
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:
64(defvar rmail-old-pruned nil) 64(defvar rmail-old-pruned nil)
65(put 'rmail-old-pruned 'permanent-local t) 65(put 'rmail-old-pruned 'permanent-local t)
66 66
67(defvar rmail-edit-saved-coding-system nil)
68(put 'rmail-edit-saved-coding-system 'permanent-local t)
69
67;;;###autoload 70;;;###autoload
68(defun rmail-edit-current-message () 71(defun rmail-edit-current-message ()
69 "Edit the contents of this message." 72 "Edit the contents of this message."
70 (interactive) 73 (interactive)
71 (make-local-variable 'rmail-old-pruned) 74 (make-local-variable 'rmail-old-pruned)
72 (setq rmail-old-pruned (rmail-msg-is-pruned)) 75 (setq rmail-old-pruned (rmail-msg-is-pruned))
76 (make-local-variable 'rmail-edit-saved-coding-system)
77 (setq rmail-edit-saved-coding-system save-buffer-coding-system)
73 (rmail-toggle-header 0) 78 (rmail-toggle-header 0)
74 (rmail-edit-mode) 79 (rmail-edit-mode)
80 ;; As the local value of save-buffer-coding-system is deleted by
81 ;; rmail-edit-mode, we restore the original value.
82 (make-local-variable 'save-buffer-coding-system)
83 (setq save-buffer-coding-system rmail-edit-saved-coding-system)
75 (make-local-variable 'rmail-old-text) 84 (make-local-variable 'rmail-old-text)
76 (setq rmail-old-text (buffer-substring (point-min) (point-max))) 85 (setq rmail-old-text (buffer-substring (point-min) (point-max)))
77 (setq buffer-read-only nil) 86 (setq buffer-read-only nil)
@@ -102,6 +111,9 @@ to return to regular RMAIL:
102 (kill-all-local-variables) 111 (kill-all-local-variables)
103 (rmail-mode-1) 112 (rmail-mode-1)
104 (rmail-variables) 113 (rmail-variables)
114 ;; As the local value of save-buffer-coding-system is changed by
115 ;; rmail-variables, we restore the original value.
116 (setq save-buffer-coding-system rmail-edit-saved-coding-system)
105 (if (and (= (length old) (- (point-max) (point-min))) 117 (if (and (= (length old) (- (point-max) (point-min)))
106 (string= old (buffer-substring (point-min) (point-max)))) 118 (string= old (buffer-substring (point-min) (point-max))))
107 () 119 ()