Commit 0e5dcfd7 authored by Luc Teirlinck's avatar Luc Teirlinck
Browse files

(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.
parent 75e975ea
......@@ -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'.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment