From 9f7cdcb454e45929b0da6cc79d075d251178ead3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Sep 2025 15:22:12 +0100 Subject: [PATCH] vc-dir-mark-unmark: When region active, don't do any y/n prompting * lisp/vc/vc-dir.el (vc-dir-mark-unmark): When region active, bind vc-dir-allow-mass-mark-changes to nil. --- lisp/vc/vc-dir.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 3d04e8eaef5..4651468f1ff 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -688,7 +688,9 @@ With prefix argument ARG, move that many lines." (not (eq processed-line (line-number-at-pos)))) (setq processed-line (line-number-at-pos)) (condition-case nil - (funcall mark-unmark-function) + ;; Avoid any prompting. + (let ((vc-dir-allow-mass-mark-changes nil)) + (funcall mark-unmark-function)) ;; `vc-dir-mark-file' signals an error if we try marking ;; a directory containing marked files in its tree, or a ;; file in a marked directory tree. Just continue.