Permalink
Browse files

Added a menu for Egg-Stash mode

The menu did not show up before at all when in Egg-Stash mode.
Enabled it and set the order of menu keybindings to appear as:

SPC:load details
h:hide/show details
a:apply
o:pop and apply stash
x:delete stash  X:delete all

The logic behind such arrangement is: first load to see the details
of the stash. Then apply it or pop & apply it. If not happy with the
stash delete it or delete all stashes.
  • Loading branch information...
1 parent ee191ad commit 15703105b5f0fed4d30c7070342ce16fe675e9a0 @dotemacs committed May 6, 2012
Showing with 9 additions and 8 deletions.
  1. +9 −8 egg.el
View
@@ -428,7 +428,7 @@ Different versions of git have different names for this subdir."
string))
(defcustom egg-show-key-help-in-buffers
- '(:log :status :diff :file-log :reflog)
+ '(:log :status :diff :file-log :reflog :stash)
"Display keybinding help in egg special buffers."
:group 'egg
:type '(set (const :tag "Status Buffer" :status)
@@ -5844,10 +5844,9 @@ Each remote ref on the commit line has extra extra extra keybindings:\\<egg-log-
(define-key map "n" 'egg-stash-buffer-next-stash)
(define-key map "s" 'egg-status)
(define-key map "p" 'egg-stash-buffer-prev-stash)
- (define-key map (kbd "RET") 'egg-stash-buffer-pop)
- (define-key map (kbd "o") 'egg-stash-buffer-pop)
+ (define-key map "RET" 'egg-stash-buffer-pop)
+ (define-key map "o" 'egg-stash-buffer-pop)
(define-key map "l" 'egg-log)
-
map))
(defconst egg-stash-map
@@ -5859,6 +5858,7 @@ Each remote ref on the commit line has extra extra extra keybindings:\\<egg-log-
(define-key map (kbd "DEL") 'egg-stash-buffer-drop)
(define-key map "x" 'egg-stash-buffer-drop)
(define-key map "X" 'egg-stash-buffer-clear)
+ (define-key map "o" 'egg-stash-buffer-pop)
map))
(defun egg-stash-buffer-next-stash ()
@@ -5885,11 +5885,12 @@ Each remote ref on the commit line has extra extra extra keybindings:\\<egg-log-
(egg-text "Extra Key Bindings for a Stash line:" 'egg-help-header-2) "\n"
(egg-pretty-help-text
"\\<egg-stash-map>"
- "\\[egg-stash-buffer-apply]:apply\n"
- "\\[egg-stash-buffer-show]:load details\n"
- "\\[egg-stash-buffer-drop]:delete stash\n"
+ "\\[egg-stash-buffer-show]:load details "
+ "\\[egg-section-cmd-toggle-hide-show]:hide/show details "
+ "\\[egg-stash-buffer-apply]:apply "
"\\[egg-stash-buffer-pop]:pop and apply stash\n"
- "\\[egg-stash-buffer-clear]:delete all\n"
+ "\\[egg-stash-buffer-drop]:delete stash "
+ "\\[egg-stash-buffer-clear]:delete all "
)
"\n"
))

0 comments on commit 1570310

Please sign in to comment.