Fix *-local-vars-hook & doom-first-*-hook not triggering
When starting Emacs with a file path argument these hooks aren't set up in time for the file to be processed. Fixes #3891, #4082, #4104
This commit is contained in:
parent
390594442a
commit
b461f76b0d
3 changed files with 14 additions and 10 deletions
17
core/core.el
17
core/core.el
|
@ -572,16 +572,17 @@ to least)."
|
|||
(with-eval-after-load 'package (require 'core-packages))
|
||||
(with-eval-after-load 'straight (doom-initialize-packages))
|
||||
|
||||
;; Bootstrap our GC manager
|
||||
(add-hook 'doom-first-input-hook #'gcmh-mode)
|
||||
|
||||
;; Bootstrap the interactive session
|
||||
(add-hook! 'window-setup-hook
|
||||
(add-hook 'hack-local-variables-hook #'doom-run-local-var-hooks-h)
|
||||
(add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-maybe-h 'append)
|
||||
(add-hook 'doom-first-input-hook #'gcmh-mode)
|
||||
(add-hook-trigger! 'doom-first-input-hook 'pre-command-hook)
|
||||
(add-hook-trigger! 'doom-first-file-hook 'after-find-file 'dired-initial-position-hook)
|
||||
(add-hook-trigger! 'doom-first-buffer-hook 'after-find-file 'doom-switch-buffer-hook))
|
||||
(add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-maybe-h)
|
||||
(add-hook 'emacs-startup-hook #'doom-load-packages-incrementally-h)
|
||||
(add-hook 'window-setup-hook #'doom-display-benchmark-h 'append)
|
||||
(add-hook 'hack-local-variables-hook #'doom-run-local-var-hooks-h)
|
||||
(add-hook 'window-setup-hook #'doom-display-benchmark-h)
|
||||
(add-hook-trigger! 'doom-first-buffer-hook 'after-find-file 'doom-switch-buffer-hook)
|
||||
(add-hook-trigger! 'doom-first-file-hook 'after-find-file 'dired-initial-position-hook)
|
||||
(add-hook-trigger! 'doom-first-input-hook 'pre-command-hook)
|
||||
(if doom-debug-p (doom-debug-mode +1))
|
||||
|
||||
;; Load core/core-*.el, the user's private init.el, then their config.el
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue