emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4650aa35: Bind vc-git-stash to a key


From: Lars Ingebrigtsen
Subject: master 4650aa35: Bind vc-git-stash to a key
Date: Wed, 30 Oct 2019 15:54:57 -0400 (EDT)

branch: master
commit 4650aa3523068b83c3d9e6276fe89eb3955ca1e3
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Bind vc-git-stash to a key
    
    * lisp/vc/vc-git.el (vc-git-stash-map): Give `vc-git-stash' a
    keystroke, because it's a useful command.
    
    When there are no stashes, there's no way to use that keystroke (since
    it's only bound on the stash lines), so perhaps that should also be
    fixed somehow.
---
 etc/NEWS          | 3 +++
 lisp/vc/vc-git.el | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 3df5015..cd1e46b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -876,6 +876,9 @@ This new user option allows customizing the default 
arguments passed to
 When some files are marked, only those are stashed.
 When no files are marked, all modified files are stashed, as before.
 
+*** 'vc-git-stash' has now been bound to the 'C' keystroke in the
+stash headers.
+
 *** The new hook 'vc-retrieve-tag-hook' runs after retrieving a tag.
 
 ---
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index ce8e57d..e0b3b09 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -648,6 +648,7 @@ or an empty string if none."
     (define-key map "A" 'vc-git-stash-apply-at-point)
     (define-key map "P" 'vc-git-stash-pop-at-point)
     (define-key map "S" 'vc-git-stash-snapshot)
+    (define-key map "C" 'vc-git-stash)
     map))
 
 (defun vc-git--make-button-text (show count1 count2)
@@ -1596,7 +1597,7 @@ This command shares argument histories with \\[rgrep] and 
\\[grep]."
 (autoload 'vc-dir-marked-files "vc-dir")
 
 (defun vc-git-stash (name)
-  "Create a stash."
+  "Create a stash given the name NAME."
   (interactive "sStash name: ")
   (let ((root (vc-git-root default-directory)))
     (when root



reply via email to

[Prev in Thread] Current Thread [Next in Thread]