Emacs - kill the buffer when quit magit
authorPeng Li <seudut@gmail.com>
Fri, 15 Sep 2017 15:07:48 +0000 (23:07 +0800)
committerPeng Li <seudut@gmail.com>
Fri, 15 Sep 2017 15:07:48 +0000 (23:07 +0800)
emacs.d/config.org

index 1347079..f304e37 100644 (file)
@@ -1262,7 +1262,9 @@ and Defined keys, using vi keybindings, Refer abo-abo's setting [[https://github
       (define-key map "n" nil)
       (define-key map "p" nil)
       (define-key map "v" 'recenter-top-bottom)
-      (define-key map "i" 'magit-section-toggle)))
+      (define-key map "i" 'magit-section-toggle))
+    (define-key magit-mode-map "q" (lambda () (interactive)
+                                     (magit-mode-bury-buffer t))))
 #+END_SRC
 
 * Eshell