From 04722d635b6109404a0893f0b04c055be73ce154 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Tue, 3 Jan 2023 12:01:43 -0900 Subject: [PATCH] MaDots: kill buffers (doesn't totally work but does help) --- lisp/mitch-packages.el | 3 +++ 1 file changed, 3 insertions(+) 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)))