aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-03-27 01:08:15 +0000
committerLuc Teirlinck2004-03-27 01:08:15 +0000
commitb0dc9757a50efcdbf15b8e20af3fccbf41606f53 (patch)
treef5ff85af0a92990f03e8126bef1605031ca8da80
parentdf9a602c9df6fa6ee09260f53ea61f51c614a421 (diff)
downloademacs-b0dc9757a50efcdbf15b8e20af3fccbf41606f53.tar.gz
emacs-b0dc9757a50efcdbf15b8e20af3fccbf41606f53.zip
(buffer-stale-function): Moved here from autorevert.el.
-rw-r--r--lisp/files.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index eb6d1635fc9..fd97afa3073 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3454,6 +3454,19 @@ and second, t if reading the auto-save file.
3454 3454
3455The function you specify is responsible for updating (or preserving) point.") 3455The function you specify is responsible for updating (or preserving) point.")
3456 3456
3457(defvar buffer-stale-function nil
3458 "Function to check whether a non-file buffer needs reverting.
3459This should be a function with one optional argument NOCONFIRM.
3460Auto Revert Mode sets NOCONFIRM to t. The function should return
3461non-nil if the buffer should be reverted. The buffer is current
3462when this function is called.
3463
3464The idea behind the NOCONFIRM argument is that the same function
3465can also be used to ask the user whether the buffer should be
3466reverted. In such a situation one has to be less careful about,
3467say, reverting remote files, than if the function is called at
3468regular intervals by Auto Revert Mode.")
3469
3457(defvar before-revert-hook nil 3470(defvar before-revert-hook nil
3458 "Normal hook for `revert-buffer' to run before reverting. 3471 "Normal hook for `revert-buffer' to run before reverting.
3459If `revert-buffer-function' is used to override the normal revert 3472If `revert-buffer-function' is used to override the normal revert