diff lisp/files.el @ 24764:ece1961bd955

(recover-file): Recover buffer-file-coding-system.
author Kenichi Handa <handa@m17n.org>
date Mon, 24 May 1999 02:09:27 +0000
parents 358a330c9931
children b772f629b45b
line wrap: on
line diff
--- a/lisp/files.el	Sun May 23 21:46:08 1999 +0000
+++ b/lisp/files.el	Mon May 24 02:09:27 1999 +0000
@@ -2807,10 +2807,13 @@
 	     (yes-or-no-p (format "Recover auto save file %s? " file-name)))
 	   (switch-to-buffer (find-file-noselect file t))
 	   (let ((buffer-read-only nil)
+		 ;; Keep the current buffer-file-coding-system.
+		 (coding-system buffer-file-coding-system)
 		 ;; Auto-saved file shoule be read without any code conversion.
 		 (coding-system-for-read 'no-conversion))
 	     (erase-buffer)
-	     (insert-file-contents file-name nil))
+	     (insert-file-contents file-name nil)
+	     (set-buffer-file-coding-system coding-system))
 	   (after-find-file nil nil t))
 	  (t (error "Recover-file cancelled")))))