mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-16 15:56:52 -05:00
Config-wide code clean up
This commit is contained in:
14
core/core.el
14
core/core.el
@@ -8,6 +8,7 @@
|
||||
;; narf:... An ex command
|
||||
;; narf|... A hook
|
||||
;; narf*... An advising function
|
||||
;; narf.... Custom hooks
|
||||
;; ...! Macro
|
||||
;;
|
||||
;;;
|
||||
@@ -128,6 +129,17 @@
|
||||
async-wait
|
||||
async-inject-variables))
|
||||
|
||||
;; Custom Hooks ;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defvar narf.window-switch-hook '()
|
||||
"Hooks run before switching windows. Hooks take two arguments (one is
|
||||
optional): WINDOW and NORECORD. WINDOW is the window being switched to. Use
|
||||
`current-buffer' to get the buffer being switched from. See `select-window' for
|
||||
details on NORECORD.")
|
||||
(defun narf*run-window-switch-hooks (window &optional norecord)
|
||||
(run-hook-with-args 'narf.window-switch-hook window norecord))
|
||||
(advice-add 'select-window :before 'narf*run-window-switch-hooks)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun narf-init ()
|
||||
@@ -153,7 +165,7 @@
|
||||
(unless (server-running-p)
|
||||
(server-start))
|
||||
|
||||
(add-hook! after-init (setq gc-cons-threshold 800000)))
|
||||
(add-hook! after-init (setq gc-cons-threshold 850000)))
|
||||
|
||||
(provide 'core)
|
||||
;;; core.el ends here
|
||||
|
Reference in New Issue
Block a user