changeset 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 c9362ef0817a
children 6c69a507d9bd
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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")))))