changeset 19914:8a303d8628b6

(mail-do-fcc): When writing to an Rmail file, use rmail-file-coding-system or else emacs-mule.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Sep 1997 08:19:54 +0000
parents 4c82de07281c
children 0ee6d171e8af
files lisp/mail/sendmail.el
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Sat Sep 13 06:32:16 1997 +0000
+++ b/lisp/mail/sendmail.el	Sat Sep 13 08:19:54 1997 +0000
@@ -910,16 +910,19 @@
 		   (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)