Mercurial > hg > xemacs-beta
comparison lisp/files.el @ 2030:488b2f76d852
[xemacs-hg @ 2004-04-19 08:54:47 by stephent]
assorted improvements in ./lisp/
<87llkswdr6.fsf@tleepslib.sk.tsukuba.ac.jp>
<87pta4we6g.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Mon, 19 Apr 2004 08:54:50 +0000 |
parents | d91e7fd568fd |
children | 19834ffbffc4 |
comparison
equal
deleted
inserted
replaced
2029:7a9919388e87 | 2030:488b2f76d852 |
---|---|
3478 (run-hooks 'revert-buffer-internal-hook))) | 3478 (run-hooks 'revert-buffer-internal-hook))) |
3479 ((null newbuf) | 3479 ((null newbuf) |
3480 ;; The resultant buffer is identical, alter | 3480 ;; The resultant buffer is identical, alter |
3481 ;; modtime, update mods and exit | 3481 ;; modtime, update mods and exit |
3482 (set-visited-file-modtime) | 3482 (set-visited-file-modtime) |
3483 (after-find-file nil nil t t t)) | 3483 (after-find-file nil nil t t t) |
3484 ;; We preserved modes above so fixup the local | |
3485 ;; variables manually | |
3486 (condition-case err | |
3487 (hack-local-variables) | |
3488 (error (lwarn 'local-variables 'warning | |
3489 "File local-variables error: %s" | |
3490 (error-message-string err))))) | |
3484 (t t)) | 3491 (t t)) |
3485 t))))) | 3492 t))))) |
3486 | 3493 |
3494 ;; #### wouldn't something like `revert-buffer-compare-with-file' be a | |
3495 ;; better name? | |
3496 ;; #### why is the argument optional? | |
3487 (defun revert-buffer-internal (&optional file-name) | 3497 (defun revert-buffer-internal (&optional file-name) |
3488 "Read contents of FILE-NAME into a buffer, and compare to current buffer. | 3498 "Read contents of FILE-NAME into a buffer, and compare to current buffer. |
3489 Return nil if identical, and the new buffer if different." | 3499 Return nil if identical, and the new buffer if different." |
3490 | 3500 |
3491 (let* ((newbuf (get-buffer-create " *revert*")) | 3501 (let* ((newbuf (get-buffer-create " *revert*")) |