mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Rename variables *-in-progress-p to *-in-progress
* doc/lispref/backups.texi (Reverting): Fix variable names revert-buffer-in-progress and auto-revert-buffer-in-progress. * etc/NEWS: Fix variable names revert-buffer-in-progress and auto-revert-buffer-in-progress. Presentational fixes and improvements. * lisp/autorevert.el (auto-revert-buffer-in-progress): Rename. (auto-revert-handler, auto-revert-buffer): Use renamed variables. * lisp/dired-x.el (dired-omit-expunge): Use `auto-revert-buffer-in-progress'. * lisp/files.el (revert-buffer-in-progress): Rename. (revert-buffer-in-progress-p): Declare obsolete. (after-find-file, revert-buffer): * lisp/saveplace.el (save-place-find-file-hook) (save-place-dired-hook): * lisp/vc/vc-git.el (vc-git-command, vc-git--out-ok): * lisp/vc/vc.el (vc-diff-internal): Use `revert-buffer-in-progress'. * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Suppress warning.
This commit is contained in:
parent
5c8234e3e7
commit
1fc4bb1fea
9 changed files with 32 additions and 19 deletions
|
|
@ -719,7 +719,7 @@ preserved, but this is up to the specific @code{revert-buffer-function}
|
|||
implementation.
|
||||
@end deffn
|
||||
|
||||
@defvar revert-buffer-in-progress-p
|
||||
@defvar revert-buffer-in-progress
|
||||
@code{revert-buffer} binds this variable to a non-@code{nil} value
|
||||
while it is working.
|
||||
@end defvar
|
||||
|
|
@ -852,7 +852,7 @@ It is important to assure that point does not continuously jump around
|
|||
as a consequence of auto-reverting. Of course, moving point might be
|
||||
inevitable if the buffer radically changes.
|
||||
|
||||
@defvar auto-revert-buffer-in-progress-p
|
||||
@defvar auto-revert-buffer-in-progress
|
||||
@code{auto-revert-buffer} binds this variable to a non-@code{nil} value
|
||||
while it is working. This can be used by major mode
|
||||
@code{revert-buffer-function} implementations to suppress messages in
|
||||
|
|
|
|||
14
etc/NEWS
14
etc/NEWS
|
|
@ -966,7 +966,7 @@ characters in CJK texts. For example, 'A' is converted to 'A', '1' is
|
|||
converted to '1', etc. Companion commands 'halfwidth-region' and
|
||||
'halfwidth-word' perform the opposite conversion.
|
||||
|
||||
** Texinfo Mode
|
||||
** Texinfo mode
|
||||
|
||||
---
|
||||
*** texinfo-mode now can auto-close the ``'' pairs.
|
||||
|
|
@ -2212,6 +2212,16 @@ destination window is chosen using 'display-buffer-alist'. Example:
|
|||
display-buffer-use-some-window)
|
||||
(some-window . mru))))
|
||||
|
||||
** Revert
|
||||
|
||||
+++
|
||||
*** Variable 'revert-buffer-in-progress' has been renamed.
|
||||
The old name, 'revert-buffer-in-progress-p', is kept as obsolete
|
||||
variable alias.
|
||||
|
||||
Symbol names with a trailing '-p' are reserved for predicates. Calling
|
||||
a variable like this was a mistake.
|
||||
|
||||
** Autorevert
|
||||
|
||||
+++
|
||||
|
|
@ -2226,7 +2236,7 @@ runs its body, and removes the current buffer from
|
|||
'inhibit-auto-revert-buffers' afterwards.
|
||||
|
||||
+++
|
||||
*** New variable 'auto-revert-buffer-in-progress-p'.
|
||||
*** New variable 'auto-revert-buffer-in-progress'.
|
||||
'auto-revert-buffer' binds this variable to a non-nil value while it is
|
||||
working. This can be used by major mode 'revert-buffer-function'
|
||||
implementations to suppress messages in Auto Revert modes, for example.
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ seconds, in addition to using notification for those files."
|
|||
;; Internal variables:
|
||||
|
||||
;;;###autoload
|
||||
(defvar auto-revert-buffer-in-progress-p nil "\
|
||||
(defvar auto-revert-buffer-in-progress nil "\
|
||||
Non-nil if a `auto-revert-buffer' operation is in progress, nil otherwise.")
|
||||
|
||||
(defvar auto-revert-buffer-list ()
|
||||
|
|
@ -875,7 +875,7 @@ This is an internal function used by Auto-Revert Mode."
|
|||
;; `preserve-modes' avoids changing the (minor) modes. But we do
|
||||
;; want to reset the mode for VC, so we do it manually.
|
||||
(when (and (not auto-revert-tail-mode) (or revert auto-revert-check-vc-info))
|
||||
(let ((revert-buffer-in-progress-p t))
|
||||
(let ((revert-buffer-in-progress t))
|
||||
(vc-refresh-state)))))
|
||||
|
||||
(defun auto-revert-tail-handler (size)
|
||||
|
|
@ -936,7 +936,7 @@ buffers not reverted last time due to user interruption."
|
|||
|
||||
This is performed as specified by Auto-Revert and Global
|
||||
Auto-Revert Modes."
|
||||
(let ((auto-revert-buffer-in-progress-p t))
|
||||
(let ((auto-revert-buffer-in-progress t))
|
||||
(if (not (buffer-live-p buf))
|
||||
(auto-revert-remove-current-buffer buf)
|
||||
(with-current-buffer buf
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ status message."
|
|||
(old-modified-p (buffer-modified-p))
|
||||
(count (or init-count 0))
|
||||
(dired-omit-verbose
|
||||
(and dired-omit-verbose (not auto-revert-buffer-in-progress-p))))
|
||||
(and dired-omit-verbose (not auto-revert-buffer-in-progress))))
|
||||
(unless (string= omit-re "")
|
||||
(let ((dired-marker-char dired-omit-marker-char))
|
||||
(when dired-omit-verbose (message "Omitting..."))
|
||||
|
|
|
|||
|
|
@ -2887,7 +2887,7 @@ error in reading the file. WARN non-nil means warn if there
|
|||
exists an auto-save file more recent than the visited file.
|
||||
NOAUTO means don't mess with auto-save mode.
|
||||
Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored
|
||||
\(see `revert-buffer-in-progress-p' for similar functionality).
|
||||
\(see `revert-buffer-in-progress' for similar functionality).
|
||||
Fifth arg NOMODES non-nil means don't alter the file's modes.
|
||||
Finishes by calling the functions in `find-file-hook'
|
||||
unless NOMODES is non-nil."
|
||||
|
|
@ -7107,9 +7107,10 @@ hook functions.
|
|||
The function `revert-buffer--default' runs this.
|
||||
A customized `revert-buffer-function' need not run this hook.")
|
||||
|
||||
(defvar revert-buffer-in-progress-p nil
|
||||
(defvar revert-buffer-in-progress nil
|
||||
"Non-nil if a `revert-buffer' operation is in progress, nil otherwise.")
|
||||
|
||||
(define-obsolete-variable-alias
|
||||
'revert-buffer-in-progress-p 'revert-buffer-in-progress "31.1")
|
||||
(defvar revert-buffer-internal-hook)
|
||||
|
||||
;; `revert-buffer-function' was defined long ago to be a function of only
|
||||
|
|
@ -7168,7 +7169,7 @@ 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.
|
||||
This function binds `revert-buffer-in-progress' 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.
|
||||
|
|
@ -7189,7 +7190,7 @@ preserve markers and overlays, at the price of being slower."
|
|||
;; reversal of the argument sense. So I'm just changing the user
|
||||
;; interface, but leaving the programmatic interface the same.
|
||||
(interactive (list (not current-prefix-arg)))
|
||||
(let ((revert-buffer-in-progress-p t)
|
||||
(let ((revert-buffer-in-progress t)
|
||||
(revert-buffer-preserve-modes preserve-modes)
|
||||
restore-functions)
|
||||
(run-hook-wrapped 'revert-buffer-restore-functions
|
||||
|
|
|
|||
|
|
@ -3669,6 +3669,8 @@ are \"file-exists-p\", \"file-readable-p\", \"file-directory-p\" and
|
|||
(defun tramp-sh-handle-vc-registered (file)
|
||||
"Like `vc-registered' for Tramp files."
|
||||
(when vc-handled-backends
|
||||
;; Starting with Emacs 31, use `revert-buffer-in-progress'.
|
||||
(with-suppressed-warnings ((obsolete revert-buffer-in-progress-p))
|
||||
(let ((inhibit-message (or revert-buffer-in-progress-p inhibit-message))
|
||||
(temp-message (unless revert-buffer-in-progress-p "")))
|
||||
(with-temp-message temp-message
|
||||
|
|
@ -3728,7 +3730,7 @@ are \"file-exists-p\", \"file-readable-p\", \"file-directory-p\" and
|
|||
;; Run.
|
||||
(tramp-with-demoted-errors
|
||||
v "Error in 2nd pass of `vc-registered': %s"
|
||||
(tramp-run-real-handler #'vc-registered (list file))))))))))
|
||||
(tramp-run-real-handler #'vc-registered (list file)))))))))))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defun tramp-sh-file-name-handler (operation &rest args)
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ It runs the hook `save-place-after-find-file-hook'."
|
|||
save-place-alist))))
|
||||
(if cell
|
||||
(progn
|
||||
(or revert-buffer-in-progress-p
|
||||
(or revert-buffer-in-progress
|
||||
(and (integerp (cdr cell))
|
||||
(goto-char (cdr cell))))
|
||||
;; and make sure it will be saved again for later
|
||||
|
|
@ -467,7 +467,7 @@ This is run via `dired-initial-position-hook', which see."
|
|||
(cell (assoc (if save-place-abbreviate-file-names
|
||||
(abbreviate-file-name item) item)
|
||||
save-place-alist)))
|
||||
(or revert-buffer-in-progress-p
|
||||
(or revert-buffer-in-progress
|
||||
(cond
|
||||
((integerp (cdr cell))
|
||||
(goto-char (cdr cell)))
|
||||
|
|
|
|||
|
|
@ -2488,7 +2488,7 @@ The difference to `vc-do-command' is that this function always invokes
|
|||
'("GIT_LITERAL_PATHSPECS=1"))
|
||||
;; Avoid repository locking during background operations
|
||||
;; (bug#21559).
|
||||
,@(when revert-buffer-in-progress-p
|
||||
,@(when revert-buffer-in-progress
|
||||
'("GIT_OPTIONAL_LOCKS=0")))
|
||||
process-environment)))
|
||||
(apply #'vc-do-command (or buffer "*vc*") okstatus vc-git-program
|
||||
|
|
@ -2527,7 +2527,7 @@ The difference to `vc-do-command' is that this function always invokes
|
|||
'("GIT_LITERAL_PATHSPECS=1"))
|
||||
;; Avoid repository locking during background operations
|
||||
;; (bug#21559).
|
||||
,@(when revert-buffer-in-progress-p
|
||||
,@(when revert-buffer-in-progress
|
||||
'("GIT_OPTIONAL_LOCKS=0")))
|
||||
process-environment)))
|
||||
(apply #'process-file vc-git-program nil buffer nil "--no-pager" command args)))
|
||||
|
|
|
|||
|
|
@ -2286,7 +2286,7 @@ Return t if the buffer had changes, nil otherwise."
|
|||
(if files (vc-coding-system-for-diff (car files)) 'undecided)
|
||||
'unix))
|
||||
(orig-diff-buffer-clone
|
||||
(if revert-buffer-in-progress-p
|
||||
(if revert-buffer-in-progress
|
||||
(clone-buffer
|
||||
(generate-new-buffer-name " *vc-diff-clone*") nil))))
|
||||
;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue