diff options
| author | Luc Teirlinck | 2004-03-27 01:08:15 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-03-27 01:08:15 +0000 |
| commit | b0dc9757a50efcdbf15b8e20af3fccbf41606f53 (patch) | |
| tree | f5ff85af0a92990f03e8126bef1605031ca8da80 | |
| parent | df9a602c9df6fa6ee09260f53ea61f51c614a421 (diff) | |
| download | emacs-b0dc9757a50efcdbf15b8e20af3fccbf41606f53.tar.gz emacs-b0dc9757a50efcdbf15b8e20af3fccbf41606f53.zip | |
(buffer-stale-function): Moved here from autorevert.el.
| -rw-r--r-- | lisp/files.el | 13 |
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 | ||
| 3455 | The function you specify is responsible for updating (or preserving) point.") | 3455 | The 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. | ||
| 3459 | This should be a function with one optional argument NOCONFIRM. | ||
| 3460 | Auto Revert Mode sets NOCONFIRM to t. The function should return | ||
| 3461 | non-nil if the buffer should be reverted. The buffer is current | ||
| 3462 | when this function is called. | ||
| 3463 | |||
| 3464 | The idea behind the NOCONFIRM argument is that the same function | ||
| 3465 | can also be used to ask the user whether the buffer should be | ||
| 3466 | reverted. In such a situation one has to be less careful about, | ||
| 3467 | say, reverting remote files, than if the function is called at | ||
| 3468 | regular 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. |
| 3459 | If `revert-buffer-function' is used to override the normal revert | 3472 | If `revert-buffer-function' is used to override the normal revert |