diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-09-13 08:19:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-09-13 08:19:54 +0000 |
commit | 55206ca664786969679769db6ef6d5fff07306de (patch) | |
tree | 5de46b2540836e2ddd8323a061300eae06c34607 | |
parent | 25c49fdcb4ac231b99ffd70c87258bc1218971bb (diff) | |
download | emacs-55206ca664786969679769db6ef6d5fff07306de.tar.gz |
(mail-do-fcc): When writing to an Rmail file,
use rmail-file-coding-system or else emacs-mule.
-rw-r--r-- | lisp/mail/sendmail.el | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index fdf4e487d97..64ed126a955 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -910,16 +910,19 @@ the user from the mailer." (mail-file-babyl-p (car fcc-list))) ;; If the file is a Babyl file, ;; convert the message to Babyl format. - (save-excursion - (set-buffer (get-buffer-create " mail-temp")) - (setq buffer-read-only nil) - (erase-buffer) - (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" - "Date: " (mail-rfc822-date) "\n") - (insert-buffer-substring curbuf beg2 end) - (insert "\n\C-_") - (write-region (point-min) (point-max) (car fcc-list) t) - (erase-buffer)) + (let ((coding-system-for-write + (or rmail-file-coding-system + 'emacs-mule))) + (save-excursion + (set-buffer (get-buffer-create " mail-temp")) + (setq buffer-read-only nil) + (erase-buffer) + (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" + "Date: " (mail-rfc822-date) "\n") + (insert-buffer-substring curbuf beg2 end) + (insert "\n\C-_") + (write-region (point-min) (point-max) (car fcc-list) t) + (erase-buffer))) (write-region (1+ (point-min)) (point-max) (car fcc-list) t)) (and buffer (not dont-write-the-file) |