summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-08-26 11:45:49 +0000
committerKenichi Handa <handa@m17n.org>1997-08-26 11:45:49 +0000
commitb77d82114f8c572900b92719d56048f09a160f7a (patch)
tree493a72a9f84b58d7b4c6dcf58c25ee02b97cea5d /lisp/files.el
parentfce31d5183bbde12934a9314a673ca4527c12039 (diff)
downloademacs-b77d82114f8c572900b92719d56048f09a160f7a.tar.gz
(revert-buffer): Read a file without any code
conversion if we are reverting from an auto-saved file.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 3d264a3ddd5..2cbce768aad 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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.