]> git.eshelyaron.com Git - emacs.git/commit
Add support for user edits to VC command arguments
authorSean Whitton <spwhitton@spwhitton.name>
Sun, 18 Sep 2022 21:47:23 +0000 (14:47 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Wed, 21 Sep 2022 19:31:05 +0000 (12:31 -0700)
commit101f3cf5b9b5600147d4406c3be8daf174e1a543
tree2b1c2c04359ada4948958695236a129bddb0fcfb
parent447ff572be1019249afb2c67411d4a5bdb0a4407
Add support for user edits to VC command arguments

* lisp/vc/vc-dispatcher.el (vc-pre-command-functions): New hook.
(vc-want-edit-command-p): New variable.
(vc-do-command): If vc-want-edit-command-p is non-nil, prompt the user
to edit the VC command & arguments before execution.  Run the new hook.
(vc-do-async-command): Use the new hook to insert into BUFFER the
command that's next to be run.
* lisp/vc/vc-git.el (vc-git--pushpull): Drop prompting code.  Bind
vc-want-edit-command-p so that vc-do-command handles the prompting.
Use the new hook to update compile-command with the edited command.
* lisp/vc/vc.el (vc-print-branch-log): A non-nil prefix argument now
means vc-want-edit-command-p is bound to a non-nil value (bug#57807).
lisp/vc/vc-dispatcher.el
lisp/vc/vc-git.el
lisp/vc/vc.el