aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2025-08-09 14:21:23 +0200
committerMichael Albinus2025-08-09 14:21:23 +0200
commit1fc4bb1fead205e425f69fa803a71f4e446d48a8 (patch)
tree1260132fdf27f7de2ed77daa0e79cc1ae31a00b8
parent5c8234e3e755141ede16adbd76ad74f5b673bfd3 (diff)
downloademacs-1fc4bb1fead205e425f69fa803a71f4e446d48a8.tar.gz
emacs-1fc4bb1fead205e425f69fa803a71f4e446d48a8.zip
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.
-rw-r--r--doc/lispref/backups.texi4
-rw-r--r--etc/NEWS14
-rw-r--r--lisp/autorevert.el6
-rw-r--r--lisp/dired-x.el2
-rw-r--r--lisp/files.el11
-rw-r--r--lisp/net/tramp-sh.el4
-rw-r--r--lisp/saveplace.el4
-rw-r--r--lisp/vc/vc-git.el4
-rw-r--r--lisp/vc/vc.el2
9 files changed, 32 insertions, 19 deletions
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index a1df26230aa..9e262346edb 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -719,7 +719,7 @@ preserved, but this is up to the specific @code{revert-buffer-function}
719implementation. 719implementation.
720@end deffn 720@end deffn
721 721
722@defvar revert-buffer-in-progress-p 722@defvar revert-buffer-in-progress
723@code{revert-buffer} binds this variable to a non-@code{nil} value 723@code{revert-buffer} binds this variable to a non-@code{nil} value
724while it is working. 724while it is working.
725@end defvar 725@end defvar
@@ -852,7 +852,7 @@ It is important to assure that point does not continuously jump around
852as a consequence of auto-reverting. Of course, moving point might be 852as a consequence of auto-reverting. Of course, moving point might be
853inevitable if the buffer radically changes. 853inevitable if the buffer radically changes.
854 854
855@defvar auto-revert-buffer-in-progress-p 855@defvar auto-revert-buffer-in-progress
856@code{auto-revert-buffer} binds this variable to a non-@code{nil} value 856@code{auto-revert-buffer} binds this variable to a non-@code{nil} value
857while it is working. This can be used by major mode 857while it is working. This can be used by major mode
858@code{revert-buffer-function} implementations to suppress messages in 858@code{revert-buffer-function} implementations to suppress messages in
diff --git a/etc/NEWS b/etc/NEWS
index 1600e1ce943..f4fdf3d4eec 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -966,7 +966,7 @@ characters in CJK texts. For example, 'A' is converted to 'A', '1' is
966converted to '1', etc. Companion commands 'halfwidth-region' and 966converted to '1', etc. Companion commands 'halfwidth-region' and
967'halfwidth-word' perform the opposite conversion. 967'halfwidth-word' perform the opposite conversion.
968 968
969** Texinfo Mode 969** Texinfo mode
970 970
971--- 971---
972*** texinfo-mode now can auto-close the ``'' pairs. 972*** texinfo-mode now can auto-close the ``'' pairs.
@@ -2212,6 +2212,16 @@ destination window is chosen using 'display-buffer-alist'. Example:
2212 display-buffer-use-some-window) 2212 display-buffer-use-some-window)
2213 (some-window . mru)))) 2213 (some-window . mru))))
2214 2214
2215** Revert
2216
2217+++
2218*** Variable 'revert-buffer-in-progress' has been renamed.
2219The old name, 'revert-buffer-in-progress-p', is kept as obsolete
2220variable alias.
2221
2222Symbol names with a trailing '-p' are reserved for predicates. Calling
2223a variable like this was a mistake.
2224
2215** Autorevert 2225** Autorevert
2216 2226
2217+++ 2227+++
@@ -2226,7 +2236,7 @@ runs its body, and removes the current buffer from
2226'inhibit-auto-revert-buffers' afterwards. 2236'inhibit-auto-revert-buffers' afterwards.
2227 2237
2228+++ 2238+++
2229*** New variable 'auto-revert-buffer-in-progress-p'. 2239*** New variable 'auto-revert-buffer-in-progress'.
2230'auto-revert-buffer' binds this variable to a non-nil value while it is 2240'auto-revert-buffer' binds this variable to a non-nil value while it is
2231working. This can be used by major mode 'revert-buffer-function' 2241working. This can be used by major mode 'revert-buffer-function'
2232implementations to suppress messages in Auto Revert modes, for example. 2242implementations to suppress messages in Auto Revert modes, for example.
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 63c7d2928c7..ccedaa759cb 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -330,7 +330,7 @@ seconds, in addition to using notification for those files."
330;; Internal variables: 330;; Internal variables:
331 331
332;;;###autoload 332;;;###autoload
333(defvar auto-revert-buffer-in-progress-p nil "\ 333(defvar auto-revert-buffer-in-progress nil "\
334Non-nil if a `auto-revert-buffer' operation is in progress, nil otherwise.") 334Non-nil if a `auto-revert-buffer' operation is in progress, nil otherwise.")
335 335
336(defvar auto-revert-buffer-list () 336(defvar auto-revert-buffer-list ()
@@ -875,7 +875,7 @@ This is an internal function used by Auto-Revert Mode."
875 ;; `preserve-modes' avoids changing the (minor) modes. But we do 875 ;; `preserve-modes' avoids changing the (minor) modes. But we do
876 ;; want to reset the mode for VC, so we do it manually. 876 ;; want to reset the mode for VC, so we do it manually.
877 (when (and (not auto-revert-tail-mode) (or revert auto-revert-check-vc-info)) 877 (when (and (not auto-revert-tail-mode) (or revert auto-revert-check-vc-info))
878 (let ((revert-buffer-in-progress-p t)) 878 (let ((revert-buffer-in-progress t))
879 (vc-refresh-state))))) 879 (vc-refresh-state)))))
880 880
881(defun auto-revert-tail-handler (size) 881(defun auto-revert-tail-handler (size)
@@ -936,7 +936,7 @@ buffers not reverted last time due to user interruption."
936 936
937This is performed as specified by Auto-Revert and Global 937This is performed as specified by Auto-Revert and Global
938Auto-Revert Modes." 938Auto-Revert Modes."
939 (let ((auto-revert-buffer-in-progress-p t)) 939 (let ((auto-revert-buffer-in-progress t))
940 (if (not (buffer-live-p buf)) 940 (if (not (buffer-live-p buf))
941 (auto-revert-remove-current-buffer buf) 941 (auto-revert-remove-current-buffer buf)
942 (with-current-buffer buf 942 (with-current-buffer buf
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 016b97d34a2..ad602b00a3e 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -477,7 +477,7 @@ status message."
477 (old-modified-p (buffer-modified-p)) 477 (old-modified-p (buffer-modified-p))
478 (count (or init-count 0)) 478 (count (or init-count 0))
479 (dired-omit-verbose 479 (dired-omit-verbose
480 (and dired-omit-verbose (not auto-revert-buffer-in-progress-p)))) 480 (and dired-omit-verbose (not auto-revert-buffer-in-progress))))
481 (unless (string= omit-re "") 481 (unless (string= omit-re "")
482 (let ((dired-marker-char dired-omit-marker-char)) 482 (let ((dired-marker-char dired-omit-marker-char))
483 (when dired-omit-verbose (message "Omitting...")) 483 (when dired-omit-verbose (message "Omitting..."))
diff --git a/lisp/files.el b/lisp/files.el
index 4567f91bc8e..5bcfa24e930 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2887,7 +2887,7 @@ error in reading the file. WARN non-nil means warn if there
2887exists an auto-save file more recent than the visited file. 2887exists an auto-save file more recent than the visited file.
2888NOAUTO means don't mess with auto-save mode. 2888NOAUTO means don't mess with auto-save mode.
2889Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored 2889Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored
2890\(see `revert-buffer-in-progress-p' for similar functionality). 2890\(see `revert-buffer-in-progress' for similar functionality).
2891Fifth arg NOMODES non-nil means don't alter the file's modes. 2891Fifth arg NOMODES non-nil means don't alter the file's modes.
2892Finishes by calling the functions in `find-file-hook' 2892Finishes by calling the functions in `find-file-hook'
2893unless NOMODES is non-nil." 2893unless NOMODES is non-nil."
@@ -7107,9 +7107,10 @@ hook functions.
7107The function `revert-buffer--default' runs this. 7107The function `revert-buffer--default' runs this.
7108A customized `revert-buffer-function' need not run this hook.") 7108A customized `revert-buffer-function' need not run this hook.")
7109 7109
7110(defvar revert-buffer-in-progress-p nil 7110(defvar revert-buffer-in-progress nil
7111 "Non-nil if a `revert-buffer' operation is in progress, nil otherwise.") 7111 "Non-nil if a `revert-buffer' operation is in progress, nil otherwise.")
7112 7112(define-obsolete-variable-alias
7113 'revert-buffer-in-progress-p 'revert-buffer-in-progress "31.1")
7113(defvar revert-buffer-internal-hook) 7114(defvar revert-buffer-internal-hook)
7114 7115
7115;; `revert-buffer-function' was defined long ago to be a function of only 7116;; `revert-buffer-function' was defined long ago to be a function of only
@@ -7168,7 +7169,7 @@ revert buffers without querying for confirmation.)
7168Optional third argument PRESERVE-MODES non-nil means don't alter 7169Optional third argument PRESERVE-MODES non-nil means don't alter
7169the files modes. Normally we reinitialize them using `normal-mode'. 7170the files modes. Normally we reinitialize them using `normal-mode'.
7170 7171
7171This function binds `revert-buffer-in-progress-p' non-nil while it operates. 7172This function binds `revert-buffer-in-progress' non-nil while it operates.
7172 7173
7173This function calls the function that `revert-buffer-function' specifies 7174This function calls the function that `revert-buffer-function' specifies
7174to do the work, with arguments IGNORE-AUTO and NOCONFIRM. 7175to do the work, with arguments IGNORE-AUTO and NOCONFIRM.
@@ -7189,7 +7190,7 @@ preserve markers and overlays, at the price of being slower."
7189 ;; reversal of the argument sense. So I'm just changing the user 7190 ;; reversal of the argument sense. So I'm just changing the user
7190 ;; interface, but leaving the programmatic interface the same. 7191 ;; interface, but leaving the programmatic interface the same.
7191 (interactive (list (not current-prefix-arg))) 7192 (interactive (list (not current-prefix-arg)))
7192 (let ((revert-buffer-in-progress-p t) 7193 (let ((revert-buffer-in-progress t)
7193 (revert-buffer-preserve-modes preserve-modes) 7194 (revert-buffer-preserve-modes preserve-modes)
7194 restore-functions) 7195 restore-functions)
7195 (run-hook-wrapped 'revert-buffer-restore-functions 7196 (run-hook-wrapped 'revert-buffer-restore-functions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 576f09b764b..51633f686eb 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3669,6 +3669,8 @@ are \"file-exists-p\", \"file-readable-p\", \"file-directory-p\" and
3669(defun tramp-sh-handle-vc-registered (file) 3669(defun tramp-sh-handle-vc-registered (file)
3670 "Like `vc-registered' for Tramp files." 3670 "Like `vc-registered' for Tramp files."
3671 (when vc-handled-backends 3671 (when vc-handled-backends
3672 ;; Starting with Emacs 31, use `revert-buffer-in-progress'.
3673 (with-suppressed-warnings ((obsolete revert-buffer-in-progress-p))
3672 (let ((inhibit-message (or revert-buffer-in-progress-p inhibit-message)) 3674 (let ((inhibit-message (or revert-buffer-in-progress-p inhibit-message))
3673 (temp-message (unless revert-buffer-in-progress-p ""))) 3675 (temp-message (unless revert-buffer-in-progress-p "")))
3674 (with-temp-message temp-message 3676 (with-temp-message temp-message
@@ -3728,7 +3730,7 @@ are \"file-exists-p\", \"file-readable-p\", \"file-directory-p\" and
3728 ;; Run. 3730 ;; Run.
3729 (tramp-with-demoted-errors 3731 (tramp-with-demoted-errors
3730 v "Error in 2nd pass of `vc-registered': %s" 3732 v "Error in 2nd pass of `vc-registered': %s"
3731 (tramp-run-real-handler #'vc-registered (list file)))))))))) 3733 (tramp-run-real-handler #'vc-registered (list file)))))))))))
3732 3734
3733;;;###tramp-autoload 3735;;;###tramp-autoload
3734(defun tramp-sh-file-name-handler (operation &rest args) 3736(defun tramp-sh-file-name-handler (operation &rest args)
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 8b8d9a445d7..1f36196408a 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -444,7 +444,7 @@ It runs the hook `save-place-after-find-file-hook'."
444 save-place-alist)))) 444 save-place-alist))))
445 (if cell 445 (if cell
446 (progn 446 (progn
447 (or revert-buffer-in-progress-p 447 (or revert-buffer-in-progress
448 (and (integerp (cdr cell)) 448 (and (integerp (cdr cell))
449 (goto-char (cdr cell)))) 449 (goto-char (cdr cell))))
450 ;; and make sure it will be saved again for later 450 ;; and make sure it will be saved again for later
@@ -467,7 +467,7 @@ This is run via `dired-initial-position-hook', which see."
467 (cell (assoc (if save-place-abbreviate-file-names 467 (cell (assoc (if save-place-abbreviate-file-names
468 (abbreviate-file-name item) item) 468 (abbreviate-file-name item) item)
469 save-place-alist))) 469 save-place-alist)))
470 (or revert-buffer-in-progress-p 470 (or revert-buffer-in-progress
471 (cond 471 (cond
472 ((integerp (cdr cell)) 472 ((integerp (cdr cell))
473 (goto-char (cdr cell))) 473 (goto-char (cdr cell)))
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 1f5ac7bd289..ab47ef6dadd 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -2488,7 +2488,7 @@ The difference to `vc-do-command' is that this function always invokes
2488 '("GIT_LITERAL_PATHSPECS=1")) 2488 '("GIT_LITERAL_PATHSPECS=1"))
2489 ;; Avoid repository locking during background operations 2489 ;; Avoid repository locking during background operations
2490 ;; (bug#21559). 2490 ;; (bug#21559).
2491 ,@(when revert-buffer-in-progress-p 2491 ,@(when revert-buffer-in-progress
2492 '("GIT_OPTIONAL_LOCKS=0"))) 2492 '("GIT_OPTIONAL_LOCKS=0")))
2493 process-environment))) 2493 process-environment)))
2494 (apply #'vc-do-command (or buffer "*vc*") okstatus vc-git-program 2494 (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
2527 '("GIT_LITERAL_PATHSPECS=1")) 2527 '("GIT_LITERAL_PATHSPECS=1"))
2528 ;; Avoid repository locking during background operations 2528 ;; Avoid repository locking during background operations
2529 ;; (bug#21559). 2529 ;; (bug#21559).
2530 ,@(when revert-buffer-in-progress-p 2530 ,@(when revert-buffer-in-progress
2531 '("GIT_OPTIONAL_LOCKS=0"))) 2531 '("GIT_OPTIONAL_LOCKS=0")))
2532 process-environment))) 2532 process-environment)))
2533 (apply #'process-file vc-git-program nil buffer nil "--no-pager" command args))) 2533 (apply #'process-file vc-git-program nil buffer nil "--no-pager" command args)))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9383788a0c3..74f25403017 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2286,7 +2286,7 @@ Return t if the buffer had changes, nil otherwise."
2286 (if files (vc-coding-system-for-diff (car files)) 'undecided) 2286 (if files (vc-coding-system-for-diff (car files)) 'undecided)
2287 'unix)) 2287 'unix))
2288 (orig-diff-buffer-clone 2288 (orig-diff-buffer-clone
2289 (if revert-buffer-in-progress-p 2289 (if revert-buffer-in-progress
2290 (clone-buffer 2290 (clone-buffer
2291 (generate-new-buffer-name " *vc-diff-clone*") nil)))) 2291 (generate-new-buffer-name " *vc-diff-clone*") nil))))
2292 ;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style 2292 ;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style