Bound my-magit-kill-buffers() to magit-bury-buffer-function.

This commit is contained in:
tastytea 2019-03-21 07:57:34 +01:00
parent 46d41a0f6d
commit 7f2e965028
2 changed files with 7 additions and 6 deletions

11
init.el
View File

@ -314,19 +314,20 @@
(use-package git-commit))
(use-package magit
:config
(defun my-magit-kill-buffers ()
(defun my-magit-kill-buffers (arg)
"Restore window configuration and kill all Magit buffers."
(interactive)
(let ((buffers (magit-mode-get-buffers)))
(magit-restore-window-configuration)
(mapc #'kill-buffer buffers)))
;; (bind-key "q" #'my-magit-kill-buffers magit-status-mode-map)
:bind
("C-x g" . magit-status)
("C-x M-g" . magit-dispatch)
(:map magit-status-mode-map
("q" . my-magit-kill-buffers)))
;; (:map magit-status-mode-map
;; ("q" . my-magit-kill-buffers))
:custom
;; What's better, mapping q or binding the function here?
(magit-bury-buffer-function 'my-magit-kill-buffers))
;; Draw line in column 80
(use-package fill-column-indicator

View File

@ -1,2 +1,2 @@
127.0.0.1:51313 9509
127.0.0.1:51313 18545
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh