(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)
"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
;;;###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.
(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))
))))))
(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
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'.