Put rebasing commands in menu.
This commit is contained in:
parent
3d1b2039ec
commit
e882f3c78a
1 changed files with 39 additions and 33 deletions
|
@ -28,12 +28,7 @@
|
||||||
(define-key map (kbd "DEL") 'magit-show-item-or-scroll-down)
|
(define-key map (kbd "DEL") 'magit-show-item-or-scroll-down)
|
||||||
(define-key map (kbd "C-w") 'magit-copy-item-as-kill)
|
(define-key map (kbd "C-w") 'magit-copy-item-as-kill)
|
||||||
(define-key map (kbd "R") 'magit-rebase-step)
|
(define-key map (kbd "R") 'magit-rebase-step)
|
||||||
(define-key map (kbd "r s") 'magit-rewrite-start)
|
(define-key map (kbd "r") (lambda () (interactive) (magit-key-mode 'rewriting)))
|
||||||
(define-key map (kbd "r t") 'magit-rewrite-stop)
|
|
||||||
(define-key map (kbd "r a") 'magit-rewrite-abort)
|
|
||||||
(define-key map (kbd "r f") 'magit-rewrite-finish)
|
|
||||||
(define-key map (kbd "r *") 'magit-rewrite-set-unused)
|
|
||||||
(define-key map (kbd "r .") 'magit-rewrite-set-used)
|
|
||||||
(define-key map (kbd "P") 'magit-push)
|
(define-key map (kbd "P") 'magit-push)
|
||||||
(define-key map (kbd "f") 'magit-remote-update)
|
(define-key map (kbd "f") 'magit-remote-update)
|
||||||
(define-key map (kbd "F") 'magit-pull)
|
(define-key map (kbd "F") 'magit-pull)
|
||||||
|
@ -170,7 +165,16 @@
|
||||||
(arguments
|
(arguments
|
||||||
("=b" "Branches" "--branches" read-from-minibuffer)
|
("=b" "Branches" "--branches" read-from-minibuffer)
|
||||||
("=a" "Author" "--author" read-from-minibuffer)
|
("=a" "Author" "--author" read-from-minibuffer)
|
||||||
("=g" "Grep" "--grep" read-from-minibuffer))))
|
("=g" "Grep" "--grep" read-from-minibuffer)))
|
||||||
|
|
||||||
|
(rewriting
|
||||||
|
(actions
|
||||||
|
("b" "Begin" magit-rewrite-start)
|
||||||
|
("s" "Stop" magit-rewrite-stop)
|
||||||
|
("a" "Abort" magit-rewrite-abort)
|
||||||
|
("f" "Finish" magit-rewrite-finish)
|
||||||
|
("*" "Set unused" magit-rewrite-set-unused)
|
||||||
|
("." "Set used" magit-rewrite-set-used))))
|
||||||
"Holds the key, help, function mapping for the log-mode. If you
|
"Holds the key, help, function mapping for the log-mode. If you
|
||||||
modify this make sure you reset `magit-key-mode-key-maps' to
|
modify this make sure you reset `magit-key-mode-key-maps' to
|
||||||
nil.")
|
nil.")
|
||||||
|
@ -222,7 +226,7 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(char space)
|
(char space)
|
||||||
(group
|
(group
|
||||||
(* (char "-="))
|
(* (char "-="))
|
||||||
(char alpha))
|
(char "*." alpha))
|
||||||
": "
|
": "
|
||||||
(group
|
(group
|
||||||
(* not-newline))))
|
(* not-newline))))
|
||||||
|
@ -241,7 +245,7 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(let ((magit-custom-options (append args magit-key-mode-current-options)))
|
(let ((magit-custom-options (append args magit-key-mode-current-options)))
|
||||||
(set-window-configuration magit-log-mode-window-conf)
|
(set-window-configuration magit-log-mode-window-conf)
|
||||||
(when func
|
(when func
|
||||||
(funcall func))
|
(call-interactively func))
|
||||||
(magit-key-mode-kill-buffer))))
|
(magit-key-mode-kill-buffer))))
|
||||||
|
|
||||||
(defvar magit-key-mode-current-args nil
|
(defvar magit-key-mode-current-args nil
|
||||||
|
@ -321,6 +325,7 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(dolist (action actions)
|
(dolist (action actions)
|
||||||
(insert
|
(insert
|
||||||
(concat " " (car action) ": " (nth 1 action) "\n")))
|
(concat " " (car action) ": " (nth 1 action) "\n")))
|
||||||
|
(when switches
|
||||||
(insert "Switches:\n")
|
(insert "Switches:\n")
|
||||||
(dolist (switch switches)
|
(dolist (switch switches)
|
||||||
(let ((option (nth 2 switch)))
|
(let ((option (nth 2 switch)))
|
||||||
|
@ -334,7 +339,8 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(if (member option magit-key-mode-current-options)
|
(if (member option magit-key-mode-current-options)
|
||||||
(propertize option 'font-lock-face 'font-lock-warning-face)
|
(propertize option 'font-lock-face 'font-lock-warning-face)
|
||||||
option)
|
option)
|
||||||
")\n"))))
|
")\n")))))
|
||||||
|
(when arguments
|
||||||
(insert "Arguments:\n")
|
(insert "Arguments:\n")
|
||||||
(dolist (argument arguments)
|
(dolist (argument arguments)
|
||||||
(insert
|
(insert
|
||||||
|
@ -349,6 +355,6 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(propertize
|
(propertize
|
||||||
(gethash (nth 2 argument) magit-key-mode-current-args "")
|
(gethash (nth 2 argument) magit-key-mode-current-args "")
|
||||||
'font-lock-face 'widget-field)
|
'font-lock-face 'widget-field)
|
||||||
"\n")))))
|
"\n"))))))
|
||||||
|
|
||||||
(provide 'magit-key-mode)
|
(provide 'magit-key-mode)
|
||||||
|
|
Loading…
Add table
Reference in a new issue