Rework vc stash bindings
authorRobert Pluim <rpluim@gmail.com>
Thu, 31 Oct 2019 09:52:20 +0000 (10:52 +0100)
committerRobert Pluim <rpluim@gmail.com>
Thu, 31 Oct 2019 09:53:05 +0000 (10:53 +0100)
commite168bb73865f64cc67f80f8b2599c826cbf9e957
tree04001f4f952cff9fc150877584f388c95521b2c6
parente65be8cc5b623385ebe31aa0a1089e0de2b075b5
Rework vc stash bindings

This adds create/snapshot bindings to the stash button even when there
are no stashes, and extends the stash menu bindings.

* etc/NEWS: Announce the bindings.

* lisp/vc/vc-git.el (vc-git-stash-shared-map): New keymap.  Holds
shared bindings between stash button and stash list.
(vc-git-stash-map): Inherit from vc-git-stash-shared-map.
(vc-git-stash-button-map): New keymap.  Holds button bindings,
inherit from vc-git-stash-shared-map.
(vc-git-stash-shared-help, vc-git-stash-list-help): New
defconsts.  Abstract out list/button help texts.
(vc-git--make-button-text): Set keymap property to
vc-git-stash-button-map.
(vc-git-make-stash-button): Use vc-git-stash-shared-help.
(vc-git-stash-menu-map): Add items for vc-git-stash and
vc-git-stash-snapshot.
(vc-git-dir-extra-headers): Use vc-git-stash-list-help and
vc-git-stash-shared-help.  Add vc-git-stash and
vc-git-stash-snapshot bindings to text shown when there are no stashes.
etc/NEWS
lisp/vc/vc-git.el