Fix startup hooks not running in vanilla sandbox
This commit is contained in:
parent
f622d51718
commit
b7f6532e4f
1 changed files with 21 additions and 10 deletions
|
@ -74,12 +74,15 @@ symbol and CDR is the value to set it to when `doom-debug-mode' is activated.")
|
||||||
-q or -Q, for example:
|
-q or -Q, for example:
|
||||||
|
|
||||||
emacs -Q -l init.el -f doom-run-all-startup-hooks-h"
|
emacs -Q -l init.el -f doom-run-all-startup-hooks-h"
|
||||||
(run-hook-wrapped 'after-init-hook #'doom-try-run-hook)
|
|
||||||
(setq after-init-time (current-time))
|
(setq after-init-time (current-time))
|
||||||
(mapc (doom-rpartial #'run-hook-wrapped #'doom-try-run-hook)
|
(let ((inhibit-startup-hooks nil))
|
||||||
(list 'delayed-warnings-hook
|
(mapc (lambda (hook)
|
||||||
'emacs-startup-hook 'tty-setup-hook
|
(run-hook-wrapped hook #'doom-try-run-hook))
|
||||||
'window-setup-hook)))
|
'(after-init-hook
|
||||||
|
delayed-warnings-hook
|
||||||
|
emacs-startup-hook
|
||||||
|
tty-setup-hook
|
||||||
|
window-setup-hook))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -318,10 +321,13 @@ Some items are not supported by the `nsm.el' module."
|
||||||
(require 'package)
|
(require 'package)
|
||||||
(with-temp-file file
|
(with-temp-file file
|
||||||
(prin1 `(progn
|
(prin1 `(progn
|
||||||
(setq noninteractive nil
|
(setq before-init-time (current-time)
|
||||||
|
after-init-time nil
|
||||||
|
noninteractive nil
|
||||||
user-init-file ,file
|
user-init-file ,file
|
||||||
process-environment ',doom--initial-process-environment
|
process-environment ',doom--initial-process-environment
|
||||||
exec-path ',doom--initial-exec-path
|
exec-path ',doom--initial-exec-path
|
||||||
|
doom-debug-p t
|
||||||
init-file-debug t
|
init-file-debug t
|
||||||
doom--initial-load-path load-path
|
doom--initial-load-path load-path
|
||||||
load-path ',load-path
|
load-path ',load-path
|
||||||
|
@ -361,20 +367,25 @@ Some items are not supported by the `nsm.el' module."
|
||||||
(--run--)
|
(--run--)
|
||||||
(maphash (doom-module-loader doom-module-init-file) doom-modules)
|
(maphash (doom-module-loader doom-module-init-file) doom-modules)
|
||||||
(maphash (doom-module-loader doom-module-config-file) doom-modules)
|
(maphash (doom-module-loader doom-module-config-file) doom-modules)
|
||||||
(run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook)
|
(run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook)))
|
||||||
(doom-run-all-startup-hooks-h)))
|
|
||||||
(`vanilla-doom ; only Doom core
|
(`vanilla-doom ; only Doom core
|
||||||
`(progn
|
`(progn
|
||||||
(load-file ,(expand-file-name "core.el" doom-core-dir))
|
(load-file ,(expand-file-name "core.el" doom-core-dir))
|
||||||
(let ((doom-init-modules-p t))
|
(let ((doom-init-modules-p t))
|
||||||
(doom-initialize)
|
(doom-initialize)
|
||||||
(doom-initialize-core-modules))
|
(doom-initialize-core-modules))
|
||||||
(--run--)
|
(--run--)))
|
||||||
(doom-run-all-startup-hooks-h)))
|
|
||||||
(`vanilla ; nothing loaded
|
(`vanilla ; nothing loaded
|
||||||
`(progn
|
`(progn
|
||||||
(package-initialize)
|
(package-initialize)
|
||||||
(--run--))))
|
(--run--))))
|
||||||
|
(current-buffer))
|
||||||
|
;; Redo all startup initialization, like running startup hooks and loading
|
||||||
|
;; init files.
|
||||||
|
(prin1 `(progn
|
||||||
|
(fset 'doom-try-run-hook #',(symbol-function #'doom-try-run-hook))
|
||||||
|
(fset 'doom-run-all-startup-hooks-h #',(symbol-function #'doom-run-all-startup-hooks-h))
|
||||||
|
(doom-run-all-startup-hooks-h))
|
||||||
(current-buffer)))
|
(current-buffer)))
|
||||||
(let ((args (if (eq mode 'doom)
|
(let ((args (if (eq mode 'doom)
|
||||||
(list "-l" file)
|
(list "-l" file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue