comparison lisp/files.el @ 5624:76f618230217

(revert-buffer): Run after-revert-hook.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 Jan 1994 19:13:11 +0000
parents cb56cce6e377
children 82588f97d478
comparison
equal deleted inserted replaced
5623:d571ad3c796e 5624:76f618230217
1722 1722
1723 Optional second argument NOCONFIRM means don't ask for confirmation at 1723 Optional second argument NOCONFIRM means don't ask for confirmation at
1724 all. 1724 all.
1725 1725
1726 If the value of `revert-buffer-function' is non-nil, it is called to 1726 If the value of `revert-buffer-function' is non-nil, it is called to
1727 do the work." 1727 do the work.
1728
1729 The normal hook `after-revert-hook' is run at the end of `revert-buffer'."
1728 ;; I admit it's odd to reverse the sense of the prefix argument, but 1730 ;; I admit it's odd to reverse the sense of the prefix argument, but
1729 ;; there is a lot of code out there which assumes that the first 1731 ;; there is a lot of code out there which assumes that the first
1730 ;; argument should be t to avoid consulting the auto-save file, and 1732 ;; argument should be t to avoid consulting the auto-save file, and
1731 ;; there's no straightforward way to encourage authors to notice a 1733 ;; there's no straightforward way to encourage authors to notice a
1732 ;; reversal of the argument sense. So I'm just changing the user 1734 ;; reversal of the argument sense. So I'm just changing the user
1772 (unlock-buffer)) 1774 (unlock-buffer))
1773 (erase-buffer)) 1775 (erase-buffer))
1774 (insert-file-contents file-name (not auto-save-p)))) 1776 (insert-file-contents file-name (not auto-save-p))))
1775 (goto-char (min opoint (point-max))) 1777 (goto-char (min opoint (point-max)))
1776 (after-find-file nil nil t) 1778 (after-find-file nil nil t)
1777 t))))) 1779 t))))
1780 (run-hooks 'after-revert-hook))
1778 1781
1779 (defun recover-file (file) 1782 (defun recover-file (file)
1780 "Visit file FILE, but get contents from its last auto-save file." 1783 "Visit file FILE, but get contents from its last auto-save file."
1781 (interactive 1784 (interactive
1782 (let ((prompt-file buffer-file-name) 1785 (let ((prompt-file buffer-file-name)