# HG changeset patch # User Kenichi Handa # Date 872595949 0 # Node ID c8a5bd70b9cd176c525fe65794ba19446a38d7bb # Parent 256843b0f804e529a04cdc768e43d6231387ec81 (revert-buffer): Read a file without any code conversion if we are reverting from an auto-saved file. diff -r 256843b0f804 -r c8a5bd70b9cd lisp/files.el --- a/lisp/files.el Tue Aug 26 11:45:49 1997 +0000 +++ b/lisp/files.el Tue Aug 26 11:45:49 1997 +0000 @@ -2524,8 +2524,13 @@ (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.