diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-12-23 00:16:06 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-12-23 00:16:06 -0500 |
commit | 4bb775412408e36d465d4401af8a85355bb4c3cd (patch) | |
tree | fafcf0f3c587ab2e76ac1e636f093bab50e7075d /lisp | |
parent | de2f912efe1ff5751f46bf548e72990689269d55 (diff) | |
download | emacs.d-4bb775412408e36d465d4401af8a85355bb4c3cd.tar.gz |
Add command magit-mode-quit-all-windows
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-git.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el index ef6b13a..9de3546 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -127,6 +127,12 @@ START-POINT set to the current branch. (magit-run-git "branch" (concat "b/" it)) (user-error "No current branch"))) +(defun km/magit-mode-quit-all-windows (&optional kill-buffer) + "Run `magit-mode-quit-window' until no longer in Magit buffer." + (interactive "P") + (while (derived-mode-p 'magit-mode) + (magit-mode-quit-window kill-buffer))) + ;; http://whattheemacsd.com/setup-magit.el-01.html (defadvice magit-status-internal (around magit-fullscreen activate) ad-do-it @@ -151,6 +157,8 @@ START-POINT set to the current branch. (remove-hook 'magit-refs-sections-hook 'magit-insert-tags) + (define-key magit-mode-map "Q" 'km/magit-mode-quit-all-windows) + (define-key magit-popup-mode-map (kbd "SPC <t>") 'magit-invoke-popup-switch) (define-key magit-popup-mode-map (kbd "SPC SPC <t>") 'magit-invoke-popup-option) |