diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-12-06 06:41:25 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-12-06 06:41:25 +0100 |
commit | 0dca455d1446eb7743594b3202b55e57615915c9 (patch) | |
tree | 8d30c9844baf0fba26e48b62ec91b9a2f7019412 /lisp/vc/vc-git.el | |
parent | 9ab479b639c3efc56c7275b662fd0d5501cbfee2 (diff) | |
download | emacs-0dca455d1446eb7743594b3202b55e57615915c9.tar.gz |
Make the Git stash commands available in vc-dir Git buffers
* lisp/vc/vc-dir.el (vc-dir): Call the backend-specific minor mode
if it exists.
* lisp/vc/vc-git.el (vc-dir-git-mode-map): New map.
(vc-dir-git-mode): New minor mode.
Diffstat (limited to 'lisp/vc/vc-git.el')
-rw-r--r-- | lisp/vc/vc-git.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 08282647eb0..3ceed365ee0 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1872,6 +1872,16 @@ Returns nil if not possible." (1- (point-max))))))) (and name (not (string= name "undefined")) name)))) +(defvar-keymap vc-dir-git-mode-map + "z c" #'vc-git-stash + "z s" #'vc-git-stash-snapshot) + +(define-minor-mode vc-dir-git-mode + "A minor mode for git-specific commands in `vc-dir-mode' buffers. +Also note that there are git stash commands available in the +\"Stash\" section at the head of the buffer." + :lighter " Git") + (provide 'vc-git) ;;; vc-git.el ends here |