# HG changeset patch # User Kenichi Handa # Date 1236045487 0 # Node ID cc888000a97c502d3ee69cfb64c42bcc92933b45 # Parent 822c5b674d12aca1c99e315dbaac3f67af7c9c78 (basic-save-buffer-1): Set car part of buffer-file-coding-system-explicit. (revert-buffer): Check car part of buffer-file-coding-system-explicit. diff -r 822c5b674d12 -r cc888000a97c lisp/files.el --- 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