Mercurial > emacs
changeset 56463:e86e7a1eccac
Describe `Auto Revert Tail Mode' in `Commentary' section.
(auto-revert-handler): Do not check `auto-revert-tail-mode' for
non-file buffers. We know it is nil.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Sat, 17 Jul 2004 20:53:22 +0000 |
parents | f8fcc5e14458 |
children | 9e7aab13fbb8 |
files | lisp/autorevert.el |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/autorevert.el Sat Jul 17 17:33:05 2004 +0000 +++ b/lisp/autorevert.el Sat Jul 17 20:53:22 2004 +0000 @@ -34,7 +34,8 @@ ;; ;; This package contains two minor modes: Global Auto-Revert Mode and ;; Auto-Revert Mode. Both modes automatically revert buffers -;; whenever the corresponding files have been changed on disk. +;; whenever the corresponding files have been changed on disk and the +;; buffer contains no unsaved changes. ;; ;; Auto-Revert Mode can be activated for individual buffers. Global ;; Auto-Revert Mode applies to all file buffers. (If the user option @@ -59,6 +60,13 @@ ;; Just put point at the end of the buffer and it will stay there. ;; These rules apply to file buffers. For non-file buffers, the ;; behavior may be mode dependent. +;; +;; While you can use Auto Revert Mode to tail a file, this package +;; contains a third minor mode, Auto Revert Tail Mode, which does so +;; more efficiently, as long as you are sure that the file will only +;; change by growing at the end. It only appends the new output, +;; instead of reverting the entire buffer. It does so even if the +;; buffer contains unsaved changes. (Because they will not be lost.) ;; Usage: ;; @@ -389,7 +397,7 @@ (not (file-remote-p buffer-file-name)) (file-readable-p buffer-file-name) (not (verify-visited-file-modtime buffer))) - (and (or auto-revert-mode auto-revert-tail-mode + (and (or auto-revert-mode global-auto-revert-non-file-buffers) revert-buffer-function (boundp 'buffer-stale-function)