From 19bc9a6d86412429ad7b812cfdc66fa1fac5a32d Mon Sep 17 00:00:00 2001 From: keiichi Date: Thu, 4 Mar 1999 11:10:28 +0000 Subject: [PATCH] Use `nnheader-message-coding-system-for-write'. (message-after-save-hook): New function. (message-mime-setup): Set buffer file coding system. Make local hook `after-save-hook'. --- lisp/message.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/message.el b/lisp/message.el index 788824c..4f6b01a 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -2914,7 +2914,7 @@ This sub function is for exclusive use of `message-send-news'." (defun message-do-fcc () "Process Fcc headers in the current buffer." (let ((case-fold-search t) - (coding-system-for-write 'raw-text) + (coding-system-for-write nnheader-message-coding-system-for-write) list file) (save-excursion (set-buffer (get-buffer-create " *message temp*")) @@ -4764,9 +4764,18 @@ This funtion will by called from \`message-mime-charset-recover-by-ask\'." message-mime-encode t nil)) +(defun message-after-save-hook () + (set-buffer-file-coding-system nnheader-message-coding-system-for-write) + (set-buffer-modified-p nil) + ) + (defun message-mime-setup () (turn-on-mime-edit) - (add-to-list 'buffer-file-format 'mime-message)) + (add-to-list 'buffer-file-format 'mime-message) + (set-buffer-file-coding-system nnheader-message-coding-system-for-write) + (make-local-hook 'after-save-hook) + (add-hook 'after-save-hook 'message-after-save-hook nil t) + ) (run-hooks 'message-load-hook) -- 1.7.10.4