summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-print.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-08-28 22:38:51 +0300
committerJuri Linkov <juri@linkov.net>2022-08-28 22:38:51 +0300
commit4803fba487d41f0817feab48b5095ef4b4940ff6 (patch)
tree9d8ec174acd273501f163a4664fb250e36c4f267 /lisp/emacs-lisp/cl-print.el
parent35af917f187719fecadde278a51fd10bf47eed07 (diff)
downloademacs-4803fba487d41f0817feab48b5095ef4b4940ff6.tar.gz
emacs-4803fba487d41f0817feab48b5095ef4b4940ff6.tar.bz2
emacs-4803fba487d41f0817feab48b5095ef4b4940ff6.zip
'C-x v v' on a diff buffer commits it as a patch (bug#52349)
* lisp/vc/diff-mode.el (diff-vc-deduce-fileset): New function. * lisp/vc/log-edit.el (log-edit-diff-patch): New function. * lisp/vc/vc-dispatcher.el (vc-log-edit): Set log-edit-diff-function to log-edit-diff-patch when vc-patch-string is non-nil. (vc-start-logentry): New optional arg 'patch-string'. Set buffer-local 'vc-patch-string' to 'patch-string'. (vc-dispatcher-browsing): Add (derived-mode-p 'diff-mode). * lisp/vc/vc-git.el (vc-git-checkin-patch): New function. (vc-git-checkin): When vc-git-patch-string is non-nil, use `git apply --cached` to add the patch to the index, then commit the staged changes. * lisp/vc/vc.el: New backend function 'checkin-patch'. (vc-deduce-fileset-1): Call diff-vc-deduce-fileset in diff-mode. (vc-next-action): For model 'patch' call vc-checkin with the diff buffer string. (vc-checkin): New optional arg 'patch-string'. Call backend function 'checkin-patch' when 'patch-string' is non-nil. Call vc-start-logentry with 'patch-string'. (vc-diff-patch-string): New function.
Diffstat (limited to 'lisp/emacs-lisp/cl-print.el')
0 files changed, 0 insertions, 0 deletions