summaryrefslogtreecommitdiff
path: root/modules/wrap-up.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /modules/wrap-up.el
new repository
Diffstat (limited to 'modules/wrap-up.el')
-rw-r--r--modules/wrap-up.el30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/wrap-up.el b/modules/wrap-up.el
new file mode 100644
index 00000000..fcc0b788
--- /dev/null
+++ b/modules/wrap-up.el
@@ -0,0 +1,30 @@
+;;; wrapup --- Functions Run Before Init Completion -*- lexical-binding: t; -*-
+;; author Craig Jennings <c@cjennings.net>
+
+;;; Commentary:
+
+;;; Code:
+
+;; -------------------------------- Bury Buffers -------------------------------
+;; wait a few seconds then bury compile-related buffers.
+
+(defun cj/bury-buffers ()
+ "Bury comint and compilation buffers."
+ (dolist (buf (buffer-list))
+ (with-current-buffer buf
+ (when (or (derived-mode-p 'comint-mode)
+ (derived-mode-p 'compilation-mode)
+ (derived-mode-p 'debugger-mode)
+ (derived-mode-p 'elisp-compile-mode)
+ (derived-mode-p 'messages-buffer-mode)
+ ) ;; byte-compilations
+ (bury-buffer)))))
+
+(defun cj/bury-buffers-after-delay ()
+ "Run cj/bury-buffers after a delay."
+ (run-with-timer 10 nil 'cj/bury-buffers))
+
+(add-hook 'emacs-startup-hook 'cj/bury-buffers-after-delay)
+
+(provide 'wrap-up)
+;;; wrap-up.el ends here