Mercurial > emacs
diff lisp/autorevert.el @ 54609:b35a0c2934f9
(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.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Sun, 28 Mar 2004 03:56:53 +0000 |
parents | 959316c3db53 |
children | ce6a58ba4c84 |
line wrap: on
line diff
--- a/lisp/autorevert.el Sun Mar 28 03:55:28 2004 +0000 +++ b/lisp/autorevert.el Sun Mar 28 03:56:53 2004 +0000 @@ -132,9 +132,7 @@ (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 @@ "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 @@ ;;;###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 @@ (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 @@ )))))) (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 `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'.