refactor: move doom-first-*-hook to doom-start

doom-start is responsible for configuring an interactive session, so
variables associated with interactive sessions ought to live there.
This commit is contained in:
Henrik Lissner 2022-09-06 19:58:33 +02:00
parent c05e61536e
commit 6cf0e04de0
No known key found for this signature in database
GPG Key ID: B60957CA074D39A3
2 changed files with 16 additions and 12 deletions

View File

@ -5,6 +5,22 @@
(require 'doom-modules) (require 'doom-modules)
;;
;;; doom-first-*-hook
(defvar doom-first-input-hook nil
"Transient hooks run before the first user input.")
(put 'doom-first-input-hook 'permanent-local t)
(defvar doom-first-file-hook nil
"Transient hooks run before the first interactively opened file.")
(put 'doom-first-file-hook 'permanent-local t)
(defvar doom-first-buffer-hook nil
"Transient hooks run before the first interactively opened buffer.")
(put 'doom-first-buffer-hook 'permanent-local t)
;; ;;
;;; Reasonable defaults for interactive sessions ;;; Reasonable defaults for interactive sessions

View File

@ -288,18 +288,6 @@ users).")
;; ;;
;;; Custom hooks ;;; Custom hooks
(defvar doom-first-input-hook nil
"Transient hooks run before the first user input.")
(put 'doom-first-input-hook 'permanent-local t)
(defvar doom-first-file-hook nil
"Transient hooks run before the first interactively opened file.")
(put 'doom-first-file-hook 'permanent-local t)
(defvar doom-first-buffer-hook nil
"Transient hooks run before the first interactively opened buffer.")
(put 'doom-first-buffer-hook 'permanent-local t)
(defvar doom-after-reload-hook nil (defvar doom-after-reload-hook nil
"A list of hooks to run after `doom/reload' has reloaded Doom.") "A list of hooks to run after `doom/reload' has reloaded Doom.")