diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-10 16:40:58 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-10 16:41:37 +0200 |
commit | ebaae4480eecb7e4757296d0a2b776ad0b960be8 (patch) | |
tree | 26b6929fa6d1590d60890ddb2ff1ecddd029c8c7 /doc | |
parent | 2656ecff96558ce2d5adf726a8574360175e6740 (diff) | |
download | emacs-ebaae4480eecb7e4757296d0a2b776ad0b960be8.tar.gz |
Add a new command `revert-buffer-quick'
* doc/emacs/files.texi (Reverting): Document it.
* lisp/bindings.el (ctl-x-x-map): Bind `C-x x g' to
`revert-buffer-quick' instead.
* lisp/files.el (revert-buffer-quick-short-answers): New user option.
(revert-buffer-quick): New command (bug#49869).
Diffstat (limited to 'doc')
-rw-r--r-- | doc/emacs/files.texi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 7edf4d2bbbf..8304e40706a 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -948,7 +948,7 @@ Manual}). For customizations, see the Custom group @code{time-stamp}. then change your mind, you can @dfn{revert} the changes and go back to the saved version of the file. To do this, type @kbd{C-x x g}. Since reverting unintentionally could lose a lot of work, Emacs asks for -confirmation first. +confirmation first if the buffer is modified. The @code{revert-buffer} command tries to position point in such a way that, if the file was edited only slightly, you will be at @@ -991,6 +991,17 @@ revert it automatically if it has changed---provided the buffer itself is not modified. (If you have edited the text, it would be wrong to discard your changes.) +@vindex revert-buffer-quick-short-answers +@findex revert-buffer-quick + The @kbd{C-x x g} keystroke is bound to the +@code{revert-buffer-quick} command. This is like the +@code{revert-buffer} command, but prompts less. Unlike +@code{revert-buffer}, it will not prompt if the current buffer visits +a file, and the buffer is not modified. It also respects the +@code{revert-buffer-quick-short-answers} user option. If this option +is non-@code{nil}, use a shorter @kbd{y/n} query instead of a longer +@kbd{yes/no} query. + You can also tell Emacs to revert buffers automatically when their visited files change on disk; @pxref{Auto Revert}. |