X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnmail.el;h=8b6befac148395e5ea10f665e985e7bec3d4a26e;hb=ee87db5d44e0d91d5cb710975c6d14fd190d738c;hp=a323f87426bb74f0e41ff9b60c5409d81fc77217;hpb=47b7a4bada24ae3f277e2a8f336128ba949840ea;p=elisp%2Fgnus.git- diff --git a/lisp/nnmail.el b/lisp/nnmail.el index a323f87..8e8359e 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -493,9 +493,9 @@ parameter. It should return nil, `warn' or `delete'." (let ((format-alist nil) (after-insert-file-functions nil)) (condition-case () - (let ((coding-system-for-read nnmail-file-coding-system) - (pathname-coding-system 'binary)) - (insert-file-contents file) + (let ((pathname-coding-system 'binary)) + (insert-file-contents-as-coding-system + nnmail-file-coding-system file) t) (file-error nil)))) @@ -1703,9 +1703,9 @@ If ARGS, PROMPT is used as an argument to `format'." (defun nnmail-write-region (start end filename &optional append visit lockname) "Do a `write-region', and then set the file modes." - (let ((coding-system-for-write nnmail-file-coding-system) - (pathname-coding-system 'binary)) - (write-region start end filename append visit lockname) + (let ((pathname-coding-system 'binary)) + (write-region-as-coding-system + nnmail-file-coding-system start end filename append visit lockname) (set-file-modes filename nnmail-default-file-modes))) ;;;