summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-13 08:19:54 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-13 08:19:54 +0000
commit55206ca664786969679769db6ef6d5fff07306de (patch)
tree5de46b2540836e2ddd8323a061300eae06c34607
parent25c49fdcb4ac231b99ffd70c87258bc1218971bb (diff)
downloademacs-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.el23
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)