From: Eli Zaretskii Date: Tue, 20 Jul 2021 15:37:40 +0000 (+0300) Subject: Fix documentation of a recent changeset X-Git-Tag: emacs-28.0.90~1784 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b575e44cbffbbfb8e09e26b94701f5bec65c9dc0;p=emacs.git Fix documentation of a recent changeset * lisp/autorevert.el (auto-revert-mode): * lisp/files.el (revert-buffer): Doc fix. (Bug#49661) --- diff --git a/lisp/autorevert.el b/lisp/autorevert.el index f8fd92d02bd..9197eadf225 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -391,10 +391,9 @@ disk changes. When a buffer is reverted, a message is generated. This can be suppressed by setting `auto-revert-verbose' to nil. -Reverting may also break markers in the buffer. To avoid that -you may set `revert-buffer-insert-file-contents-function' to the -slower function `revert-buffer-insert-file-contents-delicately'. -See its description for details. +Reverting can sometimes fail to preserve all the markers in the buffer. +To avoid that, set `revert-buffer-insert-file-contents-function' to +the slower function `revert-buffer-insert-file-contents-delicately'. Use `global-auto-revert-mode' to automatically revert all buffers. Use `auto-revert-tail-mode' if you know that the file will only grow diff --git a/lisp/files.el b/lisp/files.el index 01b8bdf5ff0..0606ed64823 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6278,10 +6278,6 @@ This undoes all changes since the file was visited or saved. With a prefix argument, offer to revert from latest auto-save file, if that is more recent than the visited file. -Reverting a buffer will try to preserve markers in the buffer, -but for better results see `revert-buffer-with-fine-grain'. For -details see the Info node `(elisp)Reverting'. - This command also implements an interface for special buffers that contain text that doesn't come from a file, but reflects some other data instead (e.g. Dired buffers, `buffer-list' @@ -6307,7 +6303,12 @@ This function binds `revert-buffer-in-progress-p' non-nil while it operates. This function calls the function that `revert-buffer-function' specifies to do the work, with arguments IGNORE-AUTO and NOCONFIRM. The default function runs the hooks `before-revert-hook' and -`after-revert-hook'." +`after-revert-hook' + +Reverting a buffer will try to preserve markers in the buffer, +but it cannot always preserve all of them. For better results, +use `revert-buffer-with-fine-grain', which tries harder to +preserve markers and overlays, at the price of being slower." ;; I admit it's odd to reverse the sense of the prefix argument, but ;; there is a lot of code out there that assumes that the first ;; argument should be t to avoid consulting the auto-save file, and