comparison lisp/files.el @ 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 608acf74b95b
children d5de4cc3f899
comparison
equal deleted inserted replaced
19551:256843b0f804 19552:c8a5bd70b9cd
2522 ;; so that we don't try to lock the file. 2522 ;; so that we don't try to lock the file.
2523 (let ((buffer-file-name nil)) 2523 (let ((buffer-file-name nil))
2524 (or auto-save-p 2524 (or auto-save-p
2525 (unlock-buffer))) 2525 (unlock-buffer)))
2526 (widen) 2526 (widen)
2527 (insert-file-contents file-name (not auto-save-p) 2527 (let ((coding-system-for-read
2528 nil nil t))) 2528 ;; Auto-saved file shoule be read without
2529 ;; any code conversion.
2530 (if auto-save-p 'no-conversion
2531 coding-system-for-read)))
2532 (insert-file-contents file-name (not auto-save-p)
2533 nil nil t))))
2529 (goto-char (min opoint (point-max))) 2534 (goto-char (min opoint (point-max)))
2530 ;; Recompute the truename in case changes in symlinks 2535 ;; Recompute the truename in case changes in symlinks
2531 ;; have changed the truename. 2536 ;; have changed the truename.
2532 (setq buffer-file-truename 2537 (setq buffer-file-truename
2533 (abbreviate-file-name (file-truename buffer-file-name))) 2538 (abbreviate-file-name (file-truename buffer-file-name)))