]> git.eshelyaron.com Git - emacs.git/commitdiff
(revert-buffer): Read a file without any code
authorKenichi Handa <handa@m17n.org>
Tue, 26 Aug 1997 11:45:49 +0000 (11:45 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 26 Aug 1997 11:45:49 +0000 (11:45 +0000)
conversion if we are reverting from an auto-saved file.

lisp/files.el

index 3d264a3ddd5f112f4389dd4b51f0a53b33704a94..2cbce768aadc9c998e914d123f7c470ac8c98f78 100644 (file)
@@ -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.