changeset 19552:c8a5bd70b9cd

(revert-buffer): Read a file without any code conversion if we are reverting from an auto-saved file.
author Kenichi Handa <handa@m17n.org>
date Tue, 26 Aug 1997 11:45:49 +0000
parents 256843b0f804
children e63ba5228950
files lisp/files.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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.