Commit 004f48da authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(basic-save-buffer-1): Set

explicit-buffer-file-coding-system to last-coding-system-used.
(revert-buffer): Pay attention to
explicit-buffer-file-coding-system (not buffer-file-coding-system)
on bind coding-system-for-read.
parent 0436cc1b
......@@ -3238,7 +3238,8 @@ Before and after saving the buffer, this function runs
(if save-buffer-coding-system
(let ((coding-system-for-write save-buffer-coding-system))
(setq explicit-buffer-file-coding-system last-coding-system-used))
;; This returns a value (MODES . BACKUPNAME), like backup-buffer.
(defun basic-save-buffer-2 ()
......@@ -3708,11 +3709,11 @@ non-nil, it is called instead of rereading visited file contents."
(let ((coding-system-for-read
;; Auto-saved file shoule be read without
;; any code conversion.
(if auto-save-p 'emacs-mule-unix
;; Auto-saved file shoule be read by Emacs'
;; internal coding.
(if auto-save-p 'auto-save-coding
(or coding-system-for-read
;; This force after-insert-file-set-coding
;; (called from insert-file-contents) to set
;; buffer-file-coding-system to a proper value.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment