diff --git a/etc/NEWS b/etc/NEWS index 3a9d5ef6f8f..9e5ac796697 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2885,6 +2885,11 @@ This command is Diff mode's specialized 'narrow-to-region'. consistency, 'diff-restrict-view' is now too. 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 +++ diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index dc17b582ed7..374ae778d55 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -384,6 +384,9 @@ the man pages for \"torsocks\" for more details about Tor." :version "27.1" :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) "Prompt the user to edit VC command COMMAND and FLAGS. 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 (butlast flags) flags)))) - " "))))) + " ") + 'vc-user-edit-command-history)))) (list (car edited) file-or-list (nconc (cdr edited) (and files-separator-p '("--"))))))