Commit b77d8211 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(revert-buffer): Read a file without any code

conversion if we are reverting from an auto-saved file.
parent fce31d51
......@@ -2524,8 +2524,13 @@ non-nil, it is called instead of rereading visited file contents."
(or auto-save-p
(unlock-buffer)))
(widen)
(insert-file-contents file-name (not auto-save-p)
nil nil t)))
(let ((coding-system-for-read
;; Auto-saved file shoule be read without
;; any code conversion.
(if auto-save-p 'no-conversion
coding-system-for-read)))
(insert-file-contents file-name (not auto-save-p)
nil nil t))))
(goto-char (min opoint (point-max)))
;; Recompute the truename in case changes in symlinks
;; have changed the truename.
......
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