X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnmail.el;h=8e8359e94a2492e8449e9cdc4c8bbe3128a5a00a;hb=ed341c45e5e97c823e86a642b7136a140f2af6f3;hp=c557fa2875dfcfd9f7c57170f9d806a8cfd547ba;hpb=2c3c8d504c37c5fa0cf60370b9c0e7460972b9ef;p=elisp%2Fgnus.git- diff --git a/lisp/nnmail.el b/lisp/nnmail.el index c557fa2..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)))) @@ -1684,11 +1684,13 @@ If ARGS, PROMPT is used as an argument to `format'." (apply 'format prompt args) prompt))) (unless nnmail-read-passwd - (if (load "passwd" t) + (if (functionp 'read-passwd) (setq nnmail-read-passwd 'read-passwd) - (unless (fboundp 'ange-ftp-read-passwd) - (autoload 'ange-ftp-read-passwd "ange-ftp")) - (setq nnmail-read-passwd 'ange-ftp-read-passwd))) + (if (load "passwd" t) + (setq nnmail-read-passwd 'read-passwd) + (unless (fboundp 'ange-ftp-read-passwd) + (autoload 'ange-ftp-read-passwd "ange-ftp")) + (setq nnmail-read-passwd 'ange-ftp-read-passwd)))) (funcall nnmail-read-passwd prompt))) (defun nnmail-check-syntax () @@ -1701,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))) ;;;