aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-03-28 03:56:53 +0000
committerLuc Teirlinck2004-03-28 03:56:53 +0000
commit0e5dcfd7b52f14ca6d604d44559776614d8d676a (patch)
tree9e64b0a9a79270fb072f7e93836a19d25d2cff70
parent75e975ea042b9666e37879a68e9237e2d507d75c (diff)
downloademacs-0e5dcfd7b52f14ca6d604d44559776614d8d676a.tar.gz
emacs-0e5dcfd7b52f14ca6d604d44559776614d8d676a.zip
(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.
-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."
132 132
133(defcustom auto-revert-verbose t 133(defcustom auto-revert-verbose t
134 "When nil, Auto-Revert Mode will not generate any messages. 134 "When nil, Auto-Revert Mode will not generate any messages.
135 135When non-nil, a message is generated whenever a file is reverted."
136Currently, messages are generated when the mode is activated or
137deactivated, and whenever a file is reverted."
138 :group 'auto-revert 136 :group 'auto-revert
139 :type 'boolean) 137 :type 'boolean)
140 138
@@ -170,7 +168,8 @@ would only waste precious space."
170 "When nil only file buffers are reverted by Global Auto-Revert Mode. 168 "When nil only file buffers are reverted by Global Auto-Revert Mode.
171 169
172When non-nil, both file buffers and buffers with a custom 170When non-nil, both file buffers and buffers with a custom
173`revert-buffer-function' are reverted by Global Auto-Revert Mode. 171`revert-buffer-function' and a `buffer-stale-function' are
172reverted by Global Auto-Revert Mode.
174 173
175Use this option with care since it could lead to excessive reverts. 174Use this option with care since it could lead to excessive reverts.
176Note also that for some non-file buffers the check whether the 175Note 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:
244 243
245;;;###autoload 244;;;###autoload
246(define-minor-mode global-auto-revert-mode 245(define-minor-mode global-auto-revert-mode
247 "Revert any buffer when file on disk change. 246 "Revert any buffer when file on disk changes.
248 247
249With arg, turn Auto Revert mode on globally if and only if arg is positive. 248With arg, turn Auto Revert mode on globally if and only if arg is positive.
250This is a minor mode that affects all buffers. 249This is a minor mode that affects all buffers.
@@ -256,7 +255,11 @@ Use `auto-revert-mode' to revert a particular buffer."
256 255
257 256
258(defun auto-revert-set-timer () 257(defun auto-revert-set-timer ()
259 "Restart or cancel the timer." 258 "Restart or cancel the timer used by Auto-Revert Mode.
259If such a timer is running, cancel it. Start a new timer if
260Global Auto-Revert Mode is active or if Auto-Revert Mode is active
261in some buffer. Restarting the timer ensures that Auto-Revert Mode
262will use an up-to-date value of `auto-revert-interval'"
260 (interactive) 263 (interactive)
261 (if (timerp auto-revert-timer) 264 (if (timerp auto-revert-timer)
262 (cancel-timer auto-revert-timer)) 265 (cancel-timer auto-revert-timer))
@@ -331,7 +334,8 @@ Use `auto-revert-mode' to revert a particular buffer."
331 )))))) 334 ))))))
332 335
333(defun auto-revert-handler () 336(defun auto-revert-handler ()
334 "Revert current buffer." 337 "Revert current buffer, if appropriate.
338This is an internal function used by Auto-Revert Mode."
335 (unless (buffer-modified-p) 339 (unless (buffer-modified-p)
336 (let (revert) 340 (let (revert)
337 (cond 341 (cond
@@ -365,10 +369,11 @@ Should `global-auto-revert-mode' be active all file buffers are checked.
365Should `auto-revert-mode' be active in some buffers, those buffers 369Should `auto-revert-mode' be active in some buffers, those buffers
366are checked. 370are checked.
367 371
368Non-file buffers that have a custom `revert-buffer-function' are 372Non-file buffers that have a custom `revert-buffer-function' and
369reverted either when Auto-Revert Mode is active in that buffer, or 373a `buffer-stale-function' are reverted either when Auto-Revert
370when the variable `global-auto-revert-non-file-buffers' is non-nil 374Mode is active in that buffer, or when the variable
371and Global Auto-Revert Mode is active. 375`global-auto-revert-non-file-buffers' is non-nil and Global
376Auto-Revert Mode is active.
372 377
373This function stops whenever there is user input. The buffers not 378This function stops whenever there is user input. The buffers not
374checked are stored in the variable `auto-revert-remaining-buffers'. 379checked are stored in the variable `auto-revert-remaining-buffers'.