changeset 22259:e7a998137db5

(rmail-output-to-rmail-file): Specify the coding system for writing.
author Richard M. Stallman <rms@gnu.org>
date Wed, 27 May 1998 06:20:15 +0000
parents 30576834668c
children b9120925ef93
files lisp/mail/rmailout.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailout.el	Tue May 26 20:56:22 1998 +0000
+++ b/lisp/mail/rmailout.el	Wed May 27 06:20:15 1998 +0000
@@ -121,7 +121,10 @@
 		  (let ((buf (find-buffer-visiting file-name))
 			(cur (current-buffer))
 			(beg (1+ (rmail-msgbeg rmail-current-message)))
-			(end (1+ (rmail-msgend rmail-current-message))))
+			(end (1+ (rmail-msgend rmail-current-message)))
+			(coding-system-for-write
+			 (or rmail-file-coding-system
+			     'emacs-mule-unix)))
 		    (if (not buf)
 			;; Output to a file.
 			(if rmail-fields-not-to-output
@@ -163,11 +166,11 @@
 				  (rmail-select-summary
 				    (rmail-update-summary)))
 			      (rmail-show-message msg))
-		;; Output file not in rmail mode => just insert at the end.
-		(narrow-to-region (point-min) (1+ (buffer-size)))
-		(goto-char (point-max))
-		(insert-buffer-substring cur beg end)
-		(rmail-delete-unwanted-fields)))))))
+			  ;; Output file not in rmail mode => just insert at the end.
+			  (narrow-to-region (point-min) (1+ (buffer-size)))
+			  (goto-char (point-max))
+			  (insert-buffer-substring cur beg end)
+			  (rmail-delete-unwanted-fields)))))))
 	      (rmail-set-attribute "filed" t))
 	  (if redelete (rmail-set-attribute "deleted" t))))
       (setq count (1- count))