summaryrefslogtreecommitdiff
path: root/lisp/autorevert.el
diff options
context:
space:
mode:
authorLuc Teirlinck <teirllm@auburn.edu>2004-03-28 03:56:53 +0000
committerLuc Teirlinck <teirllm@auburn.edu>2004-03-28 03:56:53 +0000
commit0e5dcfd7b52f14ca6d604d44559776614d8d676a (patch)
tree9e64b0a9a79270fb072f7e93836a19d25d2cff70 /lisp/autorevert.el
parent75e975ea042b9666e37879a68e9237e2d507d75c (diff)
(auto-revert-verbose, global-auto-revert-non-file-buffers)
(global-auto-revert-mode, auto-revert-set-timer) (auto-revert-handler, auto-revert-buffers): Doc fixes.
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r--lisp/autorevert.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 9d140efba84..74dfd934442 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -132,9 +132,7 @@ next editing session."
(defcustom auto-revert-verbose t
"When nil, Auto-Revert Mode will not generate any messages.
-
-Currently, messages are generated when the mode is activated or
-deactivated, and whenever a file is reverted."
+When non-nil, a message is generated whenever a file is reverted."
:group 'auto-revert
:type 'boolean)
@@ -170,7 +168,8 @@ would only waste precious space."
"When nil only file buffers are reverted by Global Auto-Revert Mode.
When non-nil, both file buffers and buffers with a custom
-`revert-buffer-function' are reverted by Global Auto-Revert Mode.
+`revert-buffer-function' and a `buffer-stale-function' are
+reverted by Global Auto-Revert Mode.
Use this option with care since it could lead to excessive reverts.
Note also that for some non-file buffers the check whether the
@@ -244,7 +243,7 @@ This function is designed to be added to hooks, for example:
;;;###autoload
(define-minor-mode global-auto-revert-mode
- "Revert any buffer when file on disk change.
+ "Revert any buffer when file on disk changes.
With arg, turn Auto Revert mode on globally if and only if arg is positive.
This is a minor mode that affects all buffers.
@@ -256,7 +255,11 @@ Use `auto-revert-mode' to revert a particular buffer."
(defun auto-revert-set-timer ()
- "Restart or cancel the timer."
+ "Restart or cancel the timer used by Auto-Revert Mode.
+If such a timer is running, cancel it. Start a new timer if
+Global Auto-Revert Mode is active or if Auto-Revert Mode is active
+in some buffer. Restarting the timer ensures that Auto-Revert Mode
+will use an up-to-date value of `auto-revert-interval'"
(interactive)
(if (timerp auto-revert-timer)
(cancel-timer auto-revert-timer))
@@ -331,7 +334,8 @@ Use `auto-revert-mode' to revert a particular buffer."
))))))
(defun auto-revert-handler ()
- "Revert current buffer."
+ "Revert current buffer, if appropriate.
+This is an internal function used by Auto-Revert Mode."
(unless (buffer-modified-p)
(let (revert)
(cond
@@ -365,10 +369,11 @@ Should `global-auto-revert-mode' be active all file buffers are checked.
Should `auto-revert-mode' be active in some buffers, those buffers
are checked.
-Non-file buffers that have a custom `revert-buffer-function' are
-reverted either when Auto-Revert Mode is active in that buffer, or
-when the variable `global-auto-revert-non-file-buffers' is non-nil
-and Global Auto-Revert Mode is active.
+Non-file buffers that have a custom `revert-buffer-function' and
+a `buffer-stale-function' are reverted either when Auto-Revert
+Mode is active in that buffer, or when the variable
+`global-auto-revert-non-file-buffers' is non-nil and Global
+Auto-Revert Mode is active.
This function stops whenever there is user input. The buffers not
checked are stored in the variable `auto-revert-remaining-buffers'.