New minibuffer history for vc-user-edit-command (bug#80169)

* lisp/vc/vc-dispatcher.el (vc-user-edit-command-history): New variable.
(vc-user-edit-command): Use it (bug#80169).
* etc/NEWS: Announce it.
This commit is contained in:
Protesilaos Stavrou 2026-01-10 08:13:12 +02:00 committed by Sean Whitton
parent 10aa35bab7
commit dda572a2fa
2 changed files with 10 additions and 1 deletions

View file

@ -2885,6 +2885,11 @@ This command is Diff mode's specialized 'narrow-to-region'.
consistency, 'diff-restrict-view' is now too. consistency, 'diff-restrict-view' is now too.
To enable it again, use 'M-x enable-command'. To enable it again, use 'M-x enable-command'.
---
*** 'C-x v !' has its own input history.
This is shared with the input history of 'C-x v P' for certain backends
which use the same mechanism as 'C-x v !'.
** Package ** Package
+++ +++

View file

@ -384,6 +384,9 @@ the man pages for \"torsocks\" for more details about Tor."
:version "27.1" :version "27.1"
:group 'vc) :group 'vc)
(defvar vc-user-edit-command-history nil
"Minibuffer history for `vc-user-edit-command'.")
(defun vc-user-edit-command (command file-or-list flags) (defun vc-user-edit-command (command file-or-list flags)
"Prompt the user to edit VC command COMMAND and FLAGS. "Prompt the user to edit VC command COMMAND and FLAGS.
Intended to be used as the value of `vc-filter-command-function'." Intended to be used as the value of `vc-filter-command-function'."
@ -398,7 +401,8 @@ Intended to be used as the value of `vc-filter-command-function'."
(cons command (remq nil (if files-separator-p (cons command (remq nil (if files-separator-p
(butlast flags) (butlast flags)
flags)))) flags))))
" "))))) " ")
'vc-user-edit-command-history))))
(list (car edited) file-or-list (list (car edited) file-or-list
(nconc (cdr edited) (and files-separator-p '("--")))))) (nconc (cdr edited) (and files-separator-p '("--"))))))