comparison lisp/files.el @ 51358:f827a37d5c82

(recover-file): Bind coding-system-for-read to auto-save-coding.
author Kenichi Handa <handa@m17n.org>
date Sat, 31 May 2003 02:00:26 +0000
parents 3df081c84ab6
children f48326c934af
comparison
equal deleted inserted replaced
51357:4830e98be217 51358:f827a37d5c82
3615 (yes-or-no-p (format "Recover auto save file %s? " file-name))) 3615 (yes-or-no-p (format "Recover auto save file %s? " file-name)))
3616 (switch-to-buffer (find-file-noselect file t)) 3616 (switch-to-buffer (find-file-noselect file t))
3617 (let ((buffer-read-only nil) 3617 (let ((buffer-read-only nil)
3618 ;; Keep the current buffer-file-coding-system. 3618 ;; Keep the current buffer-file-coding-system.
3619 (coding-system buffer-file-coding-system) 3619 (coding-system buffer-file-coding-system)
3620 ;; Auto-saved file shoule be read without any code conversion. 3620 ;; Auto-saved file shoule be read with special coding.
3621 (coding-system-for-read 'emacs-mule-unix)) 3621 (coding-system-for-read 'auto-save-coding))
3622 (erase-buffer) 3622 (erase-buffer)
3623 (insert-file-contents file-name nil) 3623 (insert-file-contents file-name nil)
3624 (set-buffer-file-coding-system coding-system)) 3624 (set-buffer-file-coding-system coding-system))
3625 (after-find-file nil nil t)) 3625 (after-find-file nil nil t))
3626 (t (error "Recover-file cancelled"))))) 3626 (t (error "Recover-file cancelled")))))