From: Kenichi Handa Date: Tue, 26 Aug 1997 11:45:49 +0000 (+0000) Subject: (revert-buffer): Read a file without any code X-Git-Tag: emacs-20.1~396 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b77d82114f8c572900b92719d56048f09a160f7a;p=emacs.git (revert-buffer): Read a file without any code conversion if we are reverting from an auto-saved file. --- 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.