From 6cf0e04de02f935d56bf6cbab85a9c20cddc1ac4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 6 Sep 2022 19:58:33 +0200 Subject: [PATCH] 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. --- lisp/doom-start.el | 16 ++++++++++++++++ lisp/doom.el | 12 ------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 6922c6b48..1601fa03d 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -5,6 +5,22 @@ (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 diff --git a/lisp/doom.el b/lisp/doom.el index 89b60dfc2..2bf8a0f07 100644 --- a/lisp/doom.el +++ b/lisp/doom.el @@ -288,18 +288,6 @@ users).") ;; ;;; 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 "A list of hooks to run after `doom/reload' has reloaded Doom.")