diff options
| author | Dave Love | 1998-03-25 19:13:11 +0000 |
|---|---|---|
| committer | Dave Love | 1998-03-25 19:13:11 +0000 |
| commit | 48764ae26314568b0f72b68397c2061ce215ca4e (patch) | |
| tree | 24f65fcdd5d4ebcdbafdd78da608185b5638017b | |
| parent | 4605a50d81572778508d3f10b4eb4cb9982b6074 (diff) | |
| download | emacs-48764ae26314568b0f72b68397c2061ce215ca4e.tar.gz emacs-48764ae26314568b0f72b68397c2061ce215ca4e.zip | |
Various doc fixes, mainly grammar.
| -rw-r--r-- | lisp/autorevert.el | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 344f230b087..97d45a582e1 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;; autorevert --- Revert buffers when file on disk change. | 1 | ;; autorevert --- Revert buffers when file on disk change. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1998 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Anders Lindgren <andersl@csd.uu.se> | 5 | ;; Author: Anders Lindgren <andersl@csd.uu.se> |
| 6 | ;; Created: 1 Jun 1997 | 6 | ;; Created: 1 Jun 1997 |
| @@ -28,31 +28,21 @@ | |||
| 28 | ;; Introduction: | 28 | ;; Introduction: |
| 29 | ;; | 29 | ;; |
| 30 | ;; Whenever a file that Emacs is editing has been changed by another | 30 | ;; Whenever a file that Emacs is editing has been changed by another |
| 31 | ;; program the user normally have to execute the command `revert-buffer' | 31 | ;; program the user normally has to execute the command `revert-buffer' |
| 32 | ;; to load the new content of the file into Emacs. | 32 | ;; to load the new content of the file into Emacs. |
| 33 | ;; | 33 | ;; |
| 34 | ;; This package contains two minor modes: Global Auto-Revert Mode and | 34 | ;; This package contains two minor modes: Global Auto-Revert Mode and |
| 35 | ;; Auto-Revert Mode. Both modes automatically reverts buffers | 35 | ;; Auto-Revert Mode. Both modes automatically revert buffers |
| 36 | ;; whenever the corresponding files have been changed on disk. | 36 | ;; whenever the corresponding files have been changed on disk. |
| 37 | ;; | 37 | ;; |
| 38 | ;; Auto-Revert Mode can be activated for individual buffers. | 38 | ;; Auto-Revert Mode can be activated for individual buffers. |
| 39 | ;; Global Auto-Revert Mode applies to all file buffers. | 39 | ;; Global Auto-Revert Mode applies to all file buffers. |
| 40 | ;; | 40 | ;; |
| 41 | ;; Both modes operates by checking the time stamp of all files at | 41 | ;; Both modes operate by checking the time stamp of all files at |
| 42 | ;; given intervals, the default is every five seconds. The check is | 42 | ;; intervals of `auto-revert-interval'. The default is every five |
| 43 | ;; aborted whenever the user actually use Emacs. Hopefully you will | 43 | ;; seconds. The check is aborted whenever the user actually uses |
| 44 | ;; never even notice that this package is active (except that your | 44 | ;; Emacs. You should never even notice that this package is active |
| 45 | ;; buffers will be reverted, of course). | 45 | ;; (except that your buffers will be reverted, of course). |
| 46 | |||
| 47 | ;; Installation: | ||
| 48 | ;; | ||
| 49 | ;; To install this package, place it in somewhere on Emacs' load-path, | ||
| 50 | ;; byte-compile it (not necessary), and place the following lines in | ||
| 51 | ;; the appropriate init file: | ||
| 52 | ;; | ||
| 53 | ;; (autoload 'auto-revert-mode "autorevert" nil t) | ||
| 54 | ;; (autoload 'turn-on-auto-revert-mode "autorevert" nil nil) | ||
| 55 | ;; (autoload 'global-auto-revert-mode "autorevert" nil t) | ||
| 56 | 46 | ||
| 57 | ;; Usage: | 47 | ;; Usage: |
| 58 | ;; | 48 | ;; |
| @@ -62,8 +52,9 @@ | |||
| 62 | ;; To activate Global Auto-Revert Mode, press: | 52 | ;; To activate Global Auto-Revert Mode, press: |
| 63 | ;; M-x global-auto-revert-mode RET | 53 | ;; M-x global-auto-revert-mode RET |
| 64 | ;; | 54 | ;; |
| 65 | ;; To activate Global Auto-Revert Mode every time Emacs is started the | 55 | ;; To activate Global Auto-Revert Mode every time Emacs is started |
| 66 | ;; following line could be added to your ~/.emacs: | 56 | ;; customise the option `global-auto-revert-mode' or the following |
| 57 | ;; line could be added to your ~/.emacs: | ||
| 67 | ;; (global-auto-revert-mode 1) | 58 | ;; (global-auto-revert-mode 1) |
| 68 | ;; | 59 | ;; |
| 69 | ;; The function `turn-on-auto-revert-mode' could be added to any major | 60 | ;; The function `turn-on-auto-revert-mode' could be added to any major |
| @@ -87,7 +78,7 @@ | |||
| 87 | ;; Files group under Emacs. | 78 | ;; Files group under Emacs. |
| 88 | 79 | ||
| 89 | (defgroup auto-revert nil | 80 | (defgroup auto-revert nil |
| 90 | "Revert individual buffer when file on disk change. | 81 | "Revert individual buffers when files on disk change. |
| 91 | 82 | ||
| 92 | Auto-Revert Mode can be activated for individual buffer. | 83 | Auto-Revert Mode can be activated for individual buffer. |
| 93 | Global Auto-Revert Mode applies to all buffers." | 84 | Global Auto-Revert Mode applies to all buffers." |
| @@ -99,14 +90,14 @@ Global Auto-Revert Mode applies to all buffers." | |||
| 99 | (defvar auto-revert-mode nil | 90 | (defvar auto-revert-mode nil |
| 100 | "*Non-nil when Auto-Revert Mode is active. | 91 | "*Non-nil when Auto-Revert Mode is active. |
| 101 | 92 | ||
| 102 | Do never set this variable directly, use the command | 93 | Never set this variable directly, use the command `auto-revert-mode' |
| 103 | `auto-revert-mode' instead.") | 94 | instead.") |
| 104 | 95 | ||
| 105 | (defcustom global-auto-revert-mode nil | 96 | (defcustom global-auto-revert-mode nil |
| 106 | "When on, buffers are automatically reverted when files on disk change. | 97 | "When on, buffers are automatically reverted when files on disk change. |
| 107 | 98 | ||
| 108 | Set this variable when using \\[customize] only. Otherwise, use the | 99 | Set this variable using \\[customize] only. Otherwise, use the |
| 109 | command `global-auto-revert-mode' instead." | 100 | command `global-auto-revert-mode'." |
| 110 | :group 'auto-revert | 101 | :group 'auto-revert |
| 111 | :initialize 'custom-initialize-default | 102 | :initialize 'custom-initialize-default |
| 112 | :set '(lambda (symbol value) | 103 | :set '(lambda (symbol value) |
| @@ -150,7 +141,7 @@ deactivated, and whenever a file is reverted." | |||
| 150 | "String to display when Global Auto-Revert Mode is active. | 141 | "String to display when Global Auto-Revert Mode is active. |
| 151 | 142 | ||
| 152 | The default is nothing since when this mode is active this text doesn't | 143 | The default is nothing since when this mode is active this text doesn't |
| 153 | vary neither over time, nor between buffers. Hence a mode line text | 144 | vary over time, or between buffers. Hence mode line text |
| 154 | would only waste precious space." | 145 | would only waste precious space." |
| 155 | :group 'auto-revert | 146 | :group 'auto-revert |
| 156 | :type 'string) | 147 | :type 'string) |
| @@ -192,7 +183,7 @@ Use this option with care since it could lead to excessive reverts." | |||
| 192 | (defvar global-auto-revert-ignore-buffer nil | 183 | (defvar global-auto-revert-ignore-buffer nil |
| 193 | "*When non-nil, Global Auto-Revert Mode will not revert this buffer. | 184 | "*When non-nil, Global Auto-Revert Mode will not revert this buffer. |
| 194 | 185 | ||
| 195 | This variable becomes buffer local when set in any faishon.") | 186 | This variable becomes buffer local when set in any fashion.") |
| 196 | (make-variable-buffer-local 'global-auto-revert-ignore-buffer) | 187 | (make-variable-buffer-local 'global-auto-revert-ignore-buffer) |
| 197 | 188 | ||
| 198 | 189 | ||
| @@ -218,9 +209,10 @@ the list of old buffers.") | |||
| 218 | 209 | ||
| 219 | ;;;###autoload | 210 | ;;;###autoload |
| 220 | (defun auto-revert-mode (&optional arg) | 211 | (defun auto-revert-mode (&optional arg) |
| 221 | "Revert buffer when file on disk change. | 212 | "Toggle reverting buffer when file on disk changes. |
| 222 | 213 | ||
| 223 | This is a minor mode that affect only the current buffer. | 214 | With arg, turn Auto Revert mode on if and only if arg is positive. |
| 215 | This is a minor mode that affects only the current buffer. | ||
| 224 | Use `global-auto-revert-mode' to automatically revert all buffers." | 216 | Use `global-auto-revert-mode' to automatically revert all buffers." |
| 225 | (interactive "P") | 217 | (interactive "P") |
| 226 | (make-local-variable 'auto-revert-mode) | 218 | (make-local-variable 'auto-revert-mode) |
| @@ -256,7 +248,8 @@ This function is designed to be added to hooks, for example: | |||
| 256 | (defun global-auto-revert-mode (&optional arg) | 248 | (defun global-auto-revert-mode (&optional arg) |
| 257 | "Revert any buffer when file on disk change. | 249 | "Revert any buffer when file on disk change. |
| 258 | 250 | ||
| 259 | This is a minor mode that affect all buffers. | 251 | With arg, turn Auto Revert mode on globally if and only if arg is positive. |
| 252 | This is a minor mode that affects all buffers. | ||
| 260 | Use `auto-revert-mode' to revert a particular buffer." | 253 | Use `auto-revert-mode' to revert a particular buffer." |
| 261 | (interactive "P") | 254 | (interactive "P") |
| 262 | (setq global-auto-revert-mode | 255 | (setq global-auto-revert-mode |
| @@ -297,13 +290,13 @@ reverted either when Auto-Revert Mode is active in that buffer, or | |||
| 297 | when the variable `global-auto-revert-non-file-buffers' is non-nil | 290 | when the variable `global-auto-revert-non-file-buffers' is non-nil |
| 298 | and Global Auto-Revert Mode is active. | 291 | and Global Auto-Revert Mode is active. |
| 299 | 292 | ||
| 300 | This function stops whenever the user use Emacs. The buffers not | 293 | This function stops whenever there is user input. The buffers not |
| 301 | checked are stored in the variable `auto-revert-remaining-buffers'. | 294 | checked are stored in the variable `auto-revert-remaining-buffers'. |
| 302 | 295 | ||
| 303 | To avoid starvation, the buffers in `auto-revert-remaining-buffers' | 296 | To avoid starvation, the buffers in `auto-revert-remaining-buffers' |
| 304 | are checked first the next time this function is called. | 297 | are checked first the next time this function is called. |
| 305 | 298 | ||
| 306 | This function is also responslible for removing buffers no longer in | 299 | This function is also responsible for removing buffers no longer in |
| 307 | Auto-Revert mode from `auto-revert-buffer-list', and for canceling | 300 | Auto-Revert mode from `auto-revert-buffer-list', and for canceling |
| 308 | the timer when no buffers need to be checked." | 301 | the timer when no buffers need to be checked." |
| 309 | (let ((bufs (if global-auto-revert-mode | 302 | (let ((bufs (if global-auto-revert-mode |