Mercurial > emacs
changeset 102364:cc888000a97c
(basic-save-buffer-1): Set car part of
buffer-file-coding-system-explicit.
(revert-buffer): Check car part of
buffer-file-coding-system-explicit.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 03 Mar 2009 01:58:07 +0000 |
parents | 822c5b674d12 |
children | 21c800bf2b35 |
files | lisp/files.el |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Tue Mar 03 01:57:22 2009 +0000 +++ b/lisp/files.el Tue Mar 03 01:58:07 2009 +0000 @@ -4187,7 +4187,10 @@ (let ((coding-system-for-write save-buffer-coding-system)) (basic-save-buffer-2)) (basic-save-buffer-2)) - (setq buffer-file-coding-system-explicit last-coding-system-used))) + (if buffer-file-coding-system-explicit + (setcar buffer-file-coding-system-explicit last-coding-system-used) + (setq buffer-file-coding-system-explicit + (cons last-coding-system-used nil))))) ;; This returns a value (MODES . BACKUPNAME), like backup-buffer. (defun basic-save-buffer-2 () @@ -4705,7 +4708,9 @@ ;; internal coding. (if auto-save-p 'auto-save-coding (or coding-system-for-read - buffer-file-coding-system-explicit)))) + (and + buffer-file-coding-system-explicit + (car buffer-file-coding-system-explicit)))))) (if (and (not enable-multibyte-characters) coding-system-for-read (not (memq (coding-system-base