commit bec823b107ef7d3b51b8e430ccab82c81bd63d24 (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Fri Jun 13 06:00:17 2025 +0300 New user option: vc-allow-async-diff Centralize the control for whether 'vc-diff' is asynchronous across the backends, while also allowing 'vc-BACKEND-diff' to be called asynchronously when needed. Previously in bug#21969. * lisp/vc/vc.el (vc-allow-async-diff): New user option. * lisp/vc/vc.el (vc-version-diff, vc-diff, vc-diff-mergebase) (vc-root-diff): Obey it. * lisp/vc/log-view.el (log-view-diff-common): Same. * lisp/vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): Same. * lisp/vc/vc-git.el (vc-git-diff): Follow the ASYNC argument. * lisp/vc/vc-hg.el (vc-hg-diff): Same. * lisp/vc/vc-rcs.el (vc-rcs-diff): Same. diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index ffe51bee10a..6394fdde6c8 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -637,6 +637,7 @@ considered file(s)." (log-view-diff-common beg end t))) (defun log-view-diff-common (beg end &optional whole-changeset) + (defvar vc-allow-async-diff) (let* ((to (log-view-current-tag beg)) (fr-entry (log-view-current-entry end)) (fr (cadr fr-entry))) @@ -650,15 +651,16 @@ considered file(s)." (point)))) (setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr))) (vc-diff-internal - t (list log-view-vc-backend - ;; The value passed here should follow what - ;; `vc-deduce-fileset' returns. If we want to see the - ;; diff for all the files in the changeset, pass NIL for - ;; the file list. - (unless whole-changeset - (if log-view-per-file-logs - (list (log-view-current-file)) - log-view-vc-fileset))) + vc-allow-async-diff + (list log-view-vc-backend + ;; The value passed here should follow what + ;; `vc-deduce-fileset' returns. If we want to see the + ;; diff for all the files in the changeset, pass NIL for + ;; the file list. + (unless whole-changeset + (if log-view-per-file-logs + (list (log-view-current-file)) + log-view-vc-fileset))) fr to))) (provide 'log-view) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 9e9d4df8cc0..de432e4e1c3 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -594,6 +594,7 @@ the file in question, search for the log entry required and move point." (car rev-at-line) t 1))))))) (defun vc-annotate-show-diff-revision-at-line-internal (filediff) + (defvar vc-allow-async-diff) (if (not (derived-mode-p 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) @@ -606,7 +607,7 @@ the file in question, search for the log entry required and move point." (vc-call-backend vc-annotate-backend 'previous-revision (if filediff fname nil) rev)) (vc-diff-internal - t + vc-allow-async-diff ;; The value passed here should follow what ;; `vc-deduce-fileset' returns. (list vc-annotate-backend diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index d85583840e9..67375255f19 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1805,7 +1805,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." samp coding-system-for-read t))) (setq coding-system-for-read 'undecided))) -(defun vc-git-diff (files &optional rev1 rev2 buffer _async) +(defun vc-git-diff (files &optional rev1 rev2 buffer async) "Get a difference report using Git between two revisions of FILES." (let (process-file-side-effects (command "diff-tree")) @@ -1817,7 +1817,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (unless rev1 (setq rev1 "HEAD"))) (if vc-git-diff-switches (apply #'vc-git-command (or buffer "*vc-diff*") - 1 ; bug#21969 + (if async 'async 1) files command "--exit-code" diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index ff761f82535..76d5529ff45 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -525,7 +525,7 @@ This requires hg 4.4 or later, for the \"-L\" option of \"hg log\"." (cons 'vc-hg-region-history-font-lock-keywords (cdr font-lock-defaults)))) -(defun vc-hg-diff (files &optional oldvers newvers buffer _async) +(defun vc-hg-diff (files &optional oldvers newvers buffer async) "Get a difference report using hg between two revisions of FILES." (let* ((firstfile (car files)) (working (and firstfile (vc-working-revision firstfile)))) @@ -535,7 +535,7 @@ This requires hg 4.4 or later, for the \"-L\" option of \"hg log\"." (setq oldvers working)) (apply #'vc-hg-command (or buffer "*vc-diff*") - nil ; bug#21969 + (if async 'async 1) files "diff" (append (vc-switches 'hg 'diff) diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 2a6c8d925b1..081f6917ddc 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -554,11 +554,10 @@ files beneath it." (vc-rcs-print-log-cleanup)) (when limit 'limit-unsupported)) -(defun vc-rcs-diff (files &optional oldvers newvers buffer _async) +(defun vc-rcs-diff (files &optional oldvers newvers buffer async) "Get a difference report using RCS between two sets of files." (apply #'vc-do-command (or buffer "*vc-diff*") - ;; The repo is local, so this is fast anyway. - 1 ; bug#21969 + (if async 'async 1) "rcsdiff" (vc-expand-dirs files 'RCS) (append (list "-q" (and oldvers (concat "-r" oldvers)) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 14d5c121a83..4233f6bd3f8 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -876,6 +876,14 @@ if the local changes in the file have not been found and displayed yet." (const :tag "Yes" t)) :version "22.1") +(defcustom vc-allow-async-diff nil + "Non-nil to allow asynchronous diff process. +Enabling this means the buffer will be displayed before the diff is +generated, and so might only say \"No changes ...\"." + :type '(choice (const :tag "No" nil) + (const :tag "Yes" t)) + :version "31.1") + ;;;###autoload (defcustom vc-checkout-hook nil "Normal hook (list of functions) run after checking out a file. @@ -2352,7 +2360,7 @@ state of each file in the fileset." (error "Not a valid revision range")) ;; Yes, it's painful to call (vc-deduce-fileset) again. Alas, the ;; placement rules for (interactive) don't actually leave us a choice. - (vc-diff-internal t (vc-deduce-fileset t) rev1 rev2 + (vc-diff-internal vc-allow-async-diff (vc-deduce-fileset t) rev1 rev2 (called-interactively-p 'interactive))) ;;;###autoload @@ -2367,7 +2375,7 @@ state of each file in the fileset." (error "Not a valid revision range")) (vc--with-backend-in-rootdir "VC root-diff" (let ((default-directory rootdir)) - (vc-diff-internal t (list backend (list rootdir)) rev1 rev2 + (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) rev1 rev2 (called-interactively-p 'interactive))))) ;;;###autoload @@ -2385,7 +2393,7 @@ Optional argument FILESET, if non-nil, overrides the fileset." (call-interactively 'vc-version-diff) (let ((fileset (or fileset (vc-deduce-fileset t)))) (vc-buffer-sync-fileset fileset not-essential) - (vc-diff-internal t fileset nil nil + (vc-diff-internal vc-allow-async-diff fileset nil nil (called-interactively-p 'interactive))))) (defun vc-buffer-sync-fileset (fileset &optional not-essential missing-in-dirs) @@ -2437,8 +2445,9 @@ The merge base is a common ancestor between REV1 and REV2 revisions." (vc--with-backend-in-rootdir "VC root-diff" (let ((default-directory rootdir) (rev1 (vc-call-backend backend 'mergebase rev1 rev2))) - (vc-diff-internal t (list backend (list rootdir)) rev1 rev2 - (called-interactively-p 'interactive))))) + (vc-diff-internal + vc-allow-async-diff (list backend (list rootdir)) rev1 rev2 + (called-interactively-p 'interactive))))) (declare-function ediff-load-version-control "ediff" (&optional silent)) (declare-function ediff-vc-internal "ediff-vers" @@ -2514,7 +2523,7 @@ saving the buffer." (let ((default-directory rootdir) (fileset `(,backend (,rootdir)))) (vc-buffer-sync-fileset fileset not-essential) - (vc-diff-internal t fileset nil nil + (vc-diff-internal vc-allow-async-diff fileset nil nil (called-interactively-p 'interactive)))))) ;;;###autoload commit 76f422da26b09a5d2646c0597871423f019a9573 Author: Juri Linkov Date: Thu Jun 12 20:22:42 2025 +0300 Add 'treesit-sexp-thing' to use instead of 'treesit-sexp-type-regexp'. * lisp/treesit.el (treesit-sexp-thing): New variable to use instead of 'treesit-sexp-type-regexp'. (treesit-sexp-thing-down-list): Rename from 'treesit-sexp-type-down-list'. (treesit-sexp-thing-up-list): Rename from 'treesit-sexp-type-up-list'. (treesit-forward-sexp, treesit--forward-list-with-default) (treesit-down-list, treesit-up-list): Update references to the above variables. (treesit-cycle-sexp-thing): Rename from 'treesit-cycle-sexp-type'. * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): Update same variables. * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): Set these variables instead of calling the function that sets them. * lisp/progmodes/python.el (python-ts-mode): Check if variables 'treesit-sentence-type-regexp' and 'treesit-sexp-type-regexp' are bound. https://lists.gnu.org/archive/html/emacs-devel/2025-06/msg00182.html diff --git a/etc/NEWS b/etc/NEWS index 3f8335bd111..e96fcb5c087 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -603,7 +603,7 @@ Visiting a file in such mode asks for confirmation before installing its tree-sitter grammar. Then it highlights the visited file according to the syntax defined by the grammar. -*** New command 'treesit-cycle-sexp-type'. +*** New command 'treesit-cycle-sexp-thing'. It cycles the type of navigation for commands that move across sexp's and lists, such as 'treesit-forward-sexp', 'treesit-forward-list', 'treesit-down-list', and 'treesit-up-list'. The type can be either diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index b98a1fb96e8..d1a78ca1018 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -797,10 +797,10 @@ Return nil if NODE is not a defun node or doesn't have a name." ;; Enable the 'sexp' navigation by default (setq-local forward-sexp-function #'treesit-forward-sexp - treesit-sexp-type-regexp 'sexp + treesit-sexp-thing 'sexp ;; But still use 'list' for `down-list' and `up-list' - treesit-sexp-type-down-list 'list - treesit-sexp-type-up-list 'list))) + treesit-sexp-thing-down-list 'list + treesit-sexp-thing-up-list 'list))) (derived-mode-add-parents 'elixir-ts-mode '(elixir-mode)) diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el index cf3fad4af10..08c9019e6bc 100644 --- a/lisp/progmodes/heex-ts-mode.el +++ b/lisp/progmodes/heex-ts-mode.el @@ -255,8 +255,10 @@ Return nil if NODE is not a defun node or doesn't have a name." `((elixir ,@elixir-ts--thing-settings))))) (treesit-major-mode-setup) + ;; Enable the 'sexp' navigation by default - (treesit-cycle-sexp-type))) + (setq-local forward-sexp-function #'treesit-forward-sexp + treesit-sexp-thing 'sexp))) (derived-mode-add-parents 'heex-ts-mode '(heex-mode)) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 96aa473e9e3..f1c18b0bd56 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -7332,18 +7332,20 @@ implementations: `python-mode' and `python-ts-mode'." (setq-local treesit-defun-name-function #'python--treesit-defun-name) - (setq-local treesit-sentence-type-regexp - (regexp-opt '("statement" - "clause"))) - - (setq-local treesit-sexp-type-regexp - (regexp-opt '("expression" - "string" - "call" - "operator" - "identifier" - "integer" - "float"))) + (when (boundp 'treesit-sentence-type-regexp) + (setq-local treesit-sentence-type-regexp + (regexp-opt '("statement" + "clause")))) + + (when (boundp 'treesit-sexp-type-regexp) + (setq-local treesit-sexp-type-regexp + (regexp-opt '("expression" + "string" + "call" + "operator" + "identifier" + "integer" + "float")))) (treesit-major-mode-setup) diff --git a/lisp/treesit.el b/lisp/treesit.el index bc6b177e25e..ae8649dc5b6 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2984,12 +2984,16 @@ delimits medium sized statements in the source code. It is, however, smaller in scope than sentences. This is used by `treesit-forward-sexp' and friends.") -(defvar-local treesit-sexp-type-down-list nil - "A regexp that matches the sexp nodes for `down-list'. +(defvar-local treesit-sexp-thing nil + "A thing that matches the sexp nodes for `forward-sexp'. +This is used by `treesit-forward-sexp' and `treesit-forward-list'.") + +(defvar-local treesit-sexp-thing-down-list nil + "A thing that matches the sexp nodes for `down-list'. This is used by `treesit-down-list'.") -(defvar-local treesit-sexp-type-up-list nil - "A regexp that matches the sexp nodes for `up-list'. +(defvar-local treesit-sexp-thing-up-list nil + "A thing that matches the sexp nodes for `up-list'. This is used by `treesit-up-list'.") ;; Avoid interpreting the symbol `list' as a function. @@ -3023,7 +3027,7 @@ across lists, whereas uses `forward-sexp-default-function' to move across atoms (such as symbols or words) inside the list." (interactive "^p") (let ((arg (or arg 1)) - (pred (or treesit-sexp-type-regexp 'sexp)) + (pred (or treesit-sexp-thing 'sexp)) (node-at-point (treesit-node-at (point) (treesit-language-at (point))))) (or (when (and node-at-point @@ -3050,7 +3054,7 @@ Fall back to DEFAULT-FUNCTION as long as it doesn't cross the boundaries of the list. ARG is described in the docstring of `forward-list'." - (let* ((pred (or treesit-sexp-type-regexp 'list)) + (let* ((pred (or treesit-sexp-thing 'list)) (arg (or arg 1)) (treesit--parser-overlay-offset (if (> arg 0) 0 -1)) (cnt arg) @@ -3137,8 +3141,8 @@ redefined by the variable `down-list-function'. ARG is described in the docstring of `down-list'." (interactive "^p") - (let* ((pred (or treesit-sexp-type-down-list - treesit-sexp-type-regexp + (let* ((pred (or treesit-sexp-thing-down-list + treesit-sexp-thing 'list)) (arg (or arg 1)) (cnt arg) @@ -3155,8 +3159,8 @@ ARG is described in the docstring of `down-list'." (treesit-thing-prev (point) pred))) (child (when sibling (treesit-node-child sibling (if (> arg 0) 0 -1))))) - (or (when (and (null (or treesit-sexp-type-down-list - treesit-sexp-type-regexp)) + (or (when (and (null (or treesit-sexp-thing-down-list + treesit-sexp-thing)) default-pos (or (null child) (if (> arg 0) @@ -3181,8 +3185,8 @@ redefined by the variable `up-list-function'. ARG is described in the docstring of `up-list'." (interactive "^p") - (let* ((pred (or treesit-sexp-type-up-list - treesit-sexp-type-regexp + (let* ((pred (or treesit-sexp-thing-up-list + treesit-sexp-thing 'list)) (arg (or arg 1)) (treesit--parser-overlay-offset -1) @@ -3211,8 +3215,8 @@ ARG is described in the docstring of `up-list'." (treesit-node-at (point) (car parsers)) pred) parsers (cdr parsers))))) - (or (when (and (null (or treesit-sexp-type-up-list - treesit-sexp-type-regexp)) + (or (when (and (null (or treesit-sexp-thing-up-list + treesit-sexp-thing)) default-pos (or (null parent) (if (> arg 0) @@ -3231,7 +3235,7 @@ ARG is described in the docstring of `up-list'." (point) (point)))))) (setq cnt (- cnt inc))))) -(defun treesit-cycle-sexp-type (&optional interactive) +(defun treesit-cycle-sexp-thing (&optional interactive) "Cycle the type of navigation for sexp and list commands. This type affects navigation commands such as `treesit-forward-sexp', `treesit-forward-list', `treesit-down-list', `treesit-up-list'. @@ -3251,19 +3255,19 @@ treesit-based modes." (interactive "p") (if (not (treesit-thing-defined-p 'list (treesit-language-at (point)))) (user-error "No `list' thing is defined in `treesit-thing-settings'") - (setq-local treesit-sexp-type-regexp - (unless treesit-sexp-type-regexp + (setq-local treesit-sexp-thing + (unless treesit-sexp-thing (if (treesit-thing-defined-p 'sexp (treesit-language-at (point))) 'sexp #'treesit-node-named)) forward-sexp-function - (if treesit-sexp-type-regexp + (if treesit-sexp-thing #'treesit-forward-sexp #'treesit-forward-sexp-list)) (when interactive - (message "Cycle sexp type to navigate %s" - (or (and treesit-sexp-type-regexp + (message "Cycle sexp thing to navigate %s" + (or (and treesit-sexp-thing "treesit nodes") "syntax symbols and treesit lists"))))) commit 799cef5d94bb69d5a1b6bcc8e90819ed90edfd00 Author: Sean Whitton Date: Thu Jun 12 11:17:27 2025 +0100 ; * lisp/vc/log-edit.el (log-edit-show-diff): Insert comma. diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index bd62e7889e8..d9b8afb2542 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -861,7 +861,7 @@ comment history, see `log-edit-comment-ring', and hides `log-edit-files-buf'." ;; Re NOT-ESSENTIAL non-nil: this function can get called from ;; `log-edit-hook' and we don't want to abort the whole Log Edit setup ;; because the user says no to saving a buffer. The buffers will - ;; still actually get saved before committing by `vc-finish-logentry'. + ;; still actually get saved before committing, by `vc-finish-logentry'. ;; Possibly `log-edit-maybe-show-diff' should catch the error instead. (vc-diff nil 'not-essential (list log-edit-vc-backend vc-log-fileset))) commit 651d4b11bcf227cd2f33bca0af5a5710101e9b39 Author: Sean Whitton Date: Thu Jun 12 11:15:56 2025 +0100 vc-finish-logentry: Fix syncing buffers: include whole fileset * lisp/vc/vc-dispatcher.el (log-edit-vc-backend) (vc-buffer-sync-fileset): Declare. (vc-finish-logentry): Call vc-buffer-sync-fileset instead of just vc-buffer-sync. diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 18c0fd5e3ca..2ea22f0622f 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -847,6 +847,9 @@ DIFF-FUNCTION is `log-edit-diff-function' for the Log Edit buffer." msg) (vc-finish-logentry (eq comment t))))) +(defvar log-edit-vc-backend) +(declare-function vc-buffer-sync-fileset "vc") + ;; vc-finish-logentry is typically called from a log-edit buffer (see ;; vc-start-logentry). (defun vc-finish-logentry (&optional nocomment) @@ -858,10 +861,9 @@ the buffer contents as a comment." ;; Check and record the comment, if any. (unless nocomment (run-hooks 'vc-logentry-check-hook)) - ;; Sync parent buffer in case the user modified it while editing the comment. - ;; But not if it is a vc-dir buffer. - (with-current-buffer vc-parent-buffer - (or (vc-dispatcher-browsing) (vc-buffer-sync))) + ;; Must pass NOT-ESSENTIAL nil because we later call + ;; `vc-resynch-buffer' with NOQUERY non-nil. + (vc-buffer-sync-fileset (list log-edit-vc-backend vc-log-fileset)) (unless vc-log-operation (error "No log operation is pending")) commit 28f40f79974245f6b144d09cc3df91c171834bf9 Author: Sean Whitton Date: Thu Jun 12 11:14:49 2025 +0100 log-edit-diff-fileset: Pass NOT-ESSENTIAL non-nil to vc-diff * lisp/vc/log-edit.el (log-edit-diff-fileset): Pass NOT-ESSENTIAL non-nil to vc-diff. diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 7f02e61787a..bd62e7889e8 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -858,7 +858,12 @@ comment history, see `log-edit-comment-ring', and hides `log-edit-files-buf'." (defun log-edit-diff-fileset () "Display diffs for the files to be committed." (interactive) - (vc-diff nil nil (list log-edit-vc-backend vc-log-fileset))) + ;; Re NOT-ESSENTIAL non-nil: this function can get called from + ;; `log-edit-hook' and we don't want to abort the whole Log Edit setup + ;; because the user says no to saving a buffer. The buffers will + ;; still actually get saved before committing by `vc-finish-logentry'. + ;; Possibly `log-edit-maybe-show-diff' should catch the error instead. + (vc-diff nil 'not-essential (list log-edit-vc-backend vc-log-fileset))) (defun log-edit-show-diff () "Show diff for the changes to be committed." commit 932e413f8afb290fa38476b0f8a78c4073240ff5 Author: Sean Whitton Date: Thu Jun 12 10:18:54 2025 +0100 Replace vc-async-checkin-backends with a backend properties function * lisp/vc/vc-git.el (vc-git-async-checkins): * lisp/vc/vc-hg.el (vc-hg-async-checkins): * lisp/vc/vc.el (vc-default-async-checkins): New functions. (vc-checkin): Use them. (vc-async-checkin-backends): Delete. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 94a9a621194..d85583840e9 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1141,6 +1141,8 @@ It is based on `log-edit-mode', and has Git-specific extensions." (file-local-name ,temp))) (delete-file ,temp)))) +(defalias 'vc-git-async-checkins #'always) + (defun vc-git-checkin (files comment &optional _rev) (let* ((parent (current-buffer)) (file1 (or (car files) default-directory)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 31506ee6493..ff761f82535 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1183,6 +1183,8 @@ It is based on `log-edit-mode', and has Hg-specific extensions.") (autoload 'vc-wait-for-process-before-save "vc-dispatcher") +(defalias 'vc-hg-async-checkins #'always) + (defun vc-hg-checkin (files comment &optional _rev) "Hg-specific version of `vc-backend-checkin'. REV is ignored." diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 291d5d02fc8..14d5c121a83 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -119,6 +119,11 @@ ;; Takes no arguments. Backends that return non-nil can update ;; buffers on `vc-retrieve-tag' based on user input. In this case ;; user will be prompted to update buffers on `vc-retrieve-tag'. +;; +;; - async-checkins +;; +;; Takes no arguments. Backends that return non-nil can (and do) +;; perform async checkins when `vc-async-checkin' is non-nil. ;; STATE-QUERYING FUNCTIONS ;; @@ -1034,9 +1039,6 @@ Not supported by all backends." :safe #'booleanp :version "31.1") -(defvar vc-async-checkin-backends '(Git Hg) - "Backends which support `vc-async-checkin'.") - (defmacro vc--with-backend-in-rootdir (desc &rest body) (declare (indent 1) (debug (sexp body))) ;; Intentionally capture `backend' and `rootdir': @@ -1912,6 +1914,8 @@ Type \\[vc-next-action] to check in changes.") (substitute-command-keys "Please explain why you stole the lock. Type \\`C-c C-c' when done")))) +(defalias 'vc-default-async-checkins #'ignore) + (defun vc-checkin (files backend &optional comment initial-contents rev patch-string register) "Check in FILES. @@ -1930,7 +1934,7 @@ registered the checkin will abort. Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (run-hooks 'vc-before-checkin-hook) (let ((do-async (and vc-async-checkin - (memq backend vc-async-checkin-backends)))) + (vc-call-backend backend 'async-checkins)))) (vc-start-logentry files comment initial-contents "Enter a change comment." commit 3b7fc1b717321d44e283432a6942ec7109eb2093 Author: Stephane Zermatten Date: Thu Jun 12 11:10:05 2025 +0300 ; Fix char encoding in term-tests.el * test/lisp/term-tests.el (term-handle-osc): Fix unicode characters using "\u" notation. (Bug#78263) diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 4fcc564cc5d..53701fad1eb 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el @@ -484,7 +484,7 @@ This is a reduced example from GNU nano's initial screen." (should (equal "test" (term-test-screen-from-input 40 1 "te\e]2;\xce\xb1\xce\xb2\e\\st"))) - (should (equal '(("2" . "αβ")) captured))) + (should (equal '(("2" . "\u03b1\u03b2")) captured))) ;; Ignore unhandled and invalid OSC sequences (setq captured nil)