Last active
August 29, 2015 14:25
-
-
Save julienXX/e57e3fbe030399e34554 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl) | |
(defun is-magit-buffer (buffer) | |
(let ((name (buffer-name buffer))) | |
(and (= ?* (aref name 0)) | |
(not (string-match "^\\*magit\\*" name))))) | |
(defun kill-magit-buffers () | |
(interactive) | |
(loop for buffer being the buffers | |
do (and (is-magit-buffer buffer) (kill-buffer buffer)))) | |
;; Plus something like this | |
(add-hook 'magit-quit-session 'kill-magit-buffers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Might need some tuning.