mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
New global minor mode vc-auto-revert-mode
* lisp/vc/vc-hooks.el (auto-revert-mode): Declare. (vc-auto-revert-mode): New global minor mode. (vc-turn-on-auto-revert-mode-for-tracked-files): New function. * lisp/vc/vc-dispatcher.el (auto-revert-mode) (auto-revert-buffers): Declare. (vc-resynch-window): Don't call vc-revert-buffer-internal when auto-revert-mode will revert the buffer. Call auto-revert-buffers to ensure that this reversion happens in a timely manner. * lisp/vc/vc.el (vc-register): Apply vc-auto-revert-mode to buffers visiting newly registered files. * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Improve the generated docstring. * doc/emacs/vc1-xtra.texi (VC Auto-Reverting): * etc/NEWS: Document the new minor mode.
This commit is contained in:
parent
24bd93b35b
commit
9d750c7e80
6 changed files with 98 additions and 35 deletions
|
|
@ -529,7 +529,11 @@ on if the hook has explicitly disabled it.
|
|||
,@(when predicate `((defvar ,MODE-predicate))))
|
||||
;; The actual global minor-mode
|
||||
(define-minor-mode ,global-mode
|
||||
,(concat (format "Toggle %s in all buffers.\n" pretty-name)
|
||||
,(concat (format "Toggle %s in many buffers.\n" pretty-name)
|
||||
(internal--format-docstring-line
|
||||
"Specifically, %s is enabled in all buffers where `%s' would do it."
|
||||
pretty-name turn-on)
|
||||
"\n\n"
|
||||
(internal--format-docstring-line
|
||||
(concat "With prefix ARG, enable %s if ARG is positive; "
|
||||
"otherwise, disable it.")
|
||||
|
|
@ -538,10 +542,6 @@ on if the hook has explicitly disabled it.
|
|||
"If called from Lisp, toggle the mode if ARG is `toggle'.
|
||||
Enable the mode if ARG is nil, omitted, or is a positive number.
|
||||
Disable the mode if ARG is a negative number.\n\n"
|
||||
(internal--format-docstring-line
|
||||
"%s is enabled in all buffers where `%s' would do it."
|
||||
pretty-name turn-on)
|
||||
"\n\n"
|
||||
(internal--format-docstring-line
|
||||
"See `%s' for more information on %s."
|
||||
mode pretty-name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue