diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index 14c8ca1..aa6755b 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -814,6 +814,7 @@ Return nil if DIR is not in a hugo project at all." (if (not (madots--magit-buffers-p)) (progn (setq magit-git-executable madots--old-magit-exe) + (setq magit-bury-buffer-function madots--old-magit-bury-buf-func) (cancel-function-timers #'madots--cleanup)))) (defun madots (&optional exe) "Magit but with custom EXE, default \"dots\"." @@ -821,6 +822,8 @@ Return nil if DIR is not in a hugo project at all." (require 'magit) (setq madots--old-magit-exe magit-git-executable) (setq magit-git-executable (or exe "dots")) + (setq madots--old-magit-bury-buf-func magit-bury-buffer-function) + (setq magit-bury-buffer-function #'kill-buffer-and-window) (magit-status) (run-with-timer 5 3 #'madots--cleanup)))