diff options
| author | Luc Teirlinck | 2004-03-28 03:56:53 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-03-28 03:56:53 +0000 |
| commit | 0e5dcfd7b52f14ca6d604d44559776614d8d676a (patch) | |
| tree | 9e64b0a9a79270fb072f7e93836a19d25d2cff70 | |
| parent | 75e975ea042b9666e37879a68e9237e2d507d75c (diff) | |
| download | emacs-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.el | 27 |
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 | 135 | When non-nil, a message is generated whenever a file is reverted." | |
| 136 | Currently, messages are generated when the mode is activated or | ||
| 137 | deactivated, 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 | ||
| 172 | When non-nil, both file buffers and buffers with a custom | 170 | When 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 |
| 172 | reverted by Global Auto-Revert Mode. | ||
| 174 | 173 | ||
| 175 | Use this option with care since it could lead to excessive reverts. | 174 | Use this option with care since it could lead to excessive reverts. |
| 176 | Note also that for some non-file buffers the check whether the | 175 | 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: | |||
| 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 | ||
| 249 | With arg, turn Auto Revert mode on globally if and only if arg is positive. | 248 | With arg, turn Auto Revert mode on globally if and only if arg is positive. |
| 250 | This is a minor mode that affects all buffers. | 249 | This 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. |
| 259 | If such a timer is running, cancel it. Start a new timer if | ||
| 260 | Global Auto-Revert Mode is active or if Auto-Revert Mode is active | ||
| 261 | in some buffer. Restarting the timer ensures that Auto-Revert Mode | ||
| 262 | will 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. |
| 338 | This 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. | |||
| 365 | Should `auto-revert-mode' be active in some buffers, those buffers | 369 | Should `auto-revert-mode' be active in some buffers, those buffers |
| 366 | are checked. | 370 | are checked. |
| 367 | 371 | ||
| 368 | Non-file buffers that have a custom `revert-buffer-function' are | 372 | Non-file buffers that have a custom `revert-buffer-function' and |
| 369 | reverted either when Auto-Revert Mode is active in that buffer, or | 373 | a `buffer-stale-function' are reverted either when Auto-Revert |
| 370 | when the variable `global-auto-revert-non-file-buffers' is non-nil | 374 | Mode is active in that buffer, or when the variable |
| 371 | and Global Auto-Revert Mode is active. | 375 | `global-auto-revert-non-file-buffers' is non-nil and Global |
| 376 | Auto-Revert Mode is active. | ||
| 372 | 377 | ||
| 373 | This function stops whenever there is user input. The buffers not | 378 | This function stops whenever there is user input. The buffers not |
| 374 | checked are stored in the variable `auto-revert-remaining-buffers'. | 379 | checked are stored in the variable `auto-revert-remaining-buffers'. |