From 608edeeb842de12cd6ee6c4525e00dcdc60fb55b Mon Sep 17 00:00:00 2001 From: Henrik Enberg Date: Fri, 27 Apr 2007 21:33:38 +0000 Subject: [PATCH] (rmail-output): Bind buffer-file-coding-system even when rmail-enable-mime is nil. --- lisp/mail/ChangeLog | 4 ++-- lisp/mail/rmailout.el | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/mail/ChangeLog b/lisp/mail/ChangeLog index 71e77869438..ecfab009f8f 100644 --- a/lisp/mail/ChangeLog +++ b/lisp/mail/ChangeLog @@ -1,7 +1,7 @@ 2007-04-27 Henrik Enberg - * rmailout.el (rmail-output): Don't bind - buffer-file-coding-system. + * rmailout.el (rmail-output): Bind buffer-file-coding-system even + when rmail-enable-mime is nil. * rmail.el (rmail-perm-variables): Make sure rmail-desc-vector is buffer local. diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 26724ee77a5..7224ce91f68 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -169,6 +169,10 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." (while (> count 0) (with-temp-buffer (insert-buffer-substring rmailbuf) + ;; ensure we can write without barfing on exotic characters + (setq buffer-file-coding-system + (or rmail-file-coding-system 'raw-text)) + ;; prune junk headers (rmail-delete-unwanted-fields) (if (not destbuf) ;; The destination file is not being visited, just write -- 2.39.5