From 8f05da4228e926b5530509c73f2d36467e4c4904 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Feb 2012 14:04:12 -0800 Subject: [PATCH] Document revert-buffer-in-progress-p * doc/lispref/backups.texi (Reverting): Mention revert-buffer-in-progress-p. * lisp/files.el (revert-buffer): Doc fix (mention revert-buffer-in-progress-p). * etc/NEWS: Related markup. --- doc/lispref/ChangeLog | 2 ++ doc/lispref/backups.texi | 3 +++ etc/NEWS | 1 + lisp/ChangeLog | 3 +++ lisp/files.el | 2 ++ 5 files changed, 11 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 459ccf63372..681b9b54678 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,7 @@ 2012-02-04 Glenn Morris + * backups.texi (Reverting): Mention revert-buffer-in-progress-p. + * debugging.texi (Error Debugging): Mention debug-on-event. * commands.texi (Misc Events): Mention sigusr1,2 and debugging. diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 969220845d0..a4b3a0b9bef 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -696,6 +696,9 @@ operation, reverting preserves all the markers. If they are not identical, reverting does change the buffer; in that case, it preserves the markers in the unchanged text (if any) at the beginning and end of the buffer. Preserving any additional markers would be problematical. + +This command binds @code{revert-buffer-in-progress-p} to a +non-@code{nil} value while it operates. @end deffn You can customize how @code{revert-buffer} does its work by setting diff --git a/etc/NEWS b/etc/NEWS index 67073cb1acf..3f84f394b14 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1388,6 +1388,7 @@ time you call `progress-reporter-update' on that progress reporter, with a nil or omitted VALUE argument, the reporter message is displayed with a "spinning bar". ++++ ** New variable `revert-buffer-in-progress-p' is true while a buffer is being reverted, even if the buffer has a local `revert-buffer-function'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24fb682235c..198b7c53322 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-02-04 Glenn Morris + * files.el (revert-buffer): + Doc fix (mention revert-buffer-in-progress-p). + * emacs-lisp/ert-x.el (ert-simulate-command): Check deferred-action-list (which is obsolete) is bound. diff --git a/lisp/files.el b/lisp/files.el index ac50e9f0a6e..8a65bc5f81f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5131,6 +5131,8 @@ revert buffers without querying for confirmation.) Optional third argument PRESERVE-MODES non-nil means don't alter the files modes. Normally we reinitialize them using `normal-mode'. +This function binds `revert-buffer-in-progress-p' non-nil while it operates. + If the value of `revert-buffer-function' is non-nil, it is called to do all the work for this command. Otherwise, the hooks `before-revert-hook' and `after-revert-hook' are run at the beginning -- 2.39.2