aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-27 06:20:15 +0000
committerRichard M. Stallman1998-05-27 06:20:15 +0000
commit839ab81f109f7b9b82eb6e2d2f2b3b0b0bacb338 (patch)
tree40cca15ef1f1b548e20bb6162a8215e7c71b8926
parent838d57f61626f1b7c081aca3e4771b73e680fc9e (diff)
downloademacs-839ab81f109f7b9b82eb6e2d2f2b3b0b0bacb338.tar.gz
emacs-839ab81f109f7b9b82eb6e2d2f2b3b0b0bacb338.zip
(rmail-output-to-rmail-file): Specify the coding system for writing.
-rw-r--r--lisp/mail/rmailout.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 7a8bfcf393e..81aa941abd4 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -121,7 +121,10 @@ starting with the current one. Deleted messages are skipped and don't count."
121 (let ((buf (find-buffer-visiting file-name)) 121 (let ((buf (find-buffer-visiting file-name))
122 (cur (current-buffer)) 122 (cur (current-buffer))
123 (beg (1+ (rmail-msgbeg rmail-current-message))) 123 (beg (1+ (rmail-msgbeg rmail-current-message)))
124 (end (1+ (rmail-msgend rmail-current-message)))) 124 (end (1+ (rmail-msgend rmail-current-message)))
125 (coding-system-for-write
126 (or rmail-file-coding-system
127 'emacs-mule-unix)))
125 (if (not buf) 128 (if (not buf)
126 ;; Output to a file. 129 ;; Output to a file.
127 (if rmail-fields-not-to-output 130 (if rmail-fields-not-to-output
@@ -163,11 +166,11 @@ starting with the current one. Deleted messages are skipped and don't count."
163 (rmail-select-summary 166 (rmail-select-summary
164 (rmail-update-summary))) 167 (rmail-update-summary)))
165 (rmail-show-message msg)) 168 (rmail-show-message msg))
166 ;; Output file not in rmail mode => just insert at the end. 169 ;; Output file not in rmail mode => just insert at the end.
167 (narrow-to-region (point-min) (1+ (buffer-size))) 170 (narrow-to-region (point-min) (1+ (buffer-size)))
168 (goto-char (point-max)) 171 (goto-char (point-max))
169 (insert-buffer-substring cur beg end) 172 (insert-buffer-substring cur beg end)
170 (rmail-delete-unwanted-fields))))))) 173 (rmail-delete-unwanted-fields)))))))
171 (rmail-set-attribute "filed" t)) 174 (rmail-set-attribute "filed" t))
172 (if redelete (rmail-set-attribute "deleted" t)))) 175 (if redelete (rmail-set-attribute "deleted" t))))
173 (setq count (1- count)) 176 (setq count (1- count))