Add early-init-file support to doom/profile-emacs #788
And fix wrong-type-argument: stringp errors when running esup. Also ensure that doom|run-all-startup-hooks sets after-init-time.
This commit is contained in:
parent
7d617f1541
commit
25d9786edf
2 changed files with 19 additions and 12 deletions
|
@ -290,17 +290,22 @@ If INIT-FILE is non-nil, profile that instead of USER-INIT-FILE."
|
||||||
(setq esup-server-process (esup-server-create (esup-select-port)))
|
(setq esup-server-process (esup-server-create (esup-select-port)))
|
||||||
(setq esup-server-port (process-contact esup-server-process :service))
|
(setq esup-server-port (process-contact esup-server-process :service))
|
||||||
(message "esup process started on port %s" esup-server-port)
|
(message "esup process started on port %s" esup-server-port)
|
||||||
(let ((process-args `("*esup-child*"
|
(let ((process-args
|
||||||
"*esup-child*"
|
(append `("*esup-child*"
|
||||||
,esup-emacs-path
|
"*esup-child*"
|
||||||
"-q"
|
,esup-emacs-path
|
||||||
"-L" ,esup-load-path
|
"-Q"
|
||||||
"-l" "esup-child"
|
"--eval=(setq after-init-time nil)"
|
||||||
,(format "--eval=(esup-child-run \"%s\" \"%s\" %d)"
|
"-L" ,esup-load-path)
|
||||||
init-file
|
(when (bound-and-true-p early-init-file)
|
||||||
esup-server-port
|
`("-l" ,early-init-file))
|
||||||
esup-depth)
|
`("-l" "esup-child"
|
||||||
"--eval=(doom|run-all-startup-hooks)")))
|
,(format "--eval=(let ((load-file-name \"%s\")) (esup-child-run \"%s\" \"%s\" %d))"
|
||||||
|
init-file
|
||||||
|
init-file
|
||||||
|
esup-server-port
|
||||||
|
esup-depth)
|
||||||
|
"--eval=(doom|run-all-startup-hooks)"))))
|
||||||
(when esup-run-as-batch-p
|
(when esup-run-as-batch-p
|
||||||
(setq process-args (append process-args '("--batch"))))
|
(setq process-args (append process-args '("--batch"))))
|
||||||
(setq esup-child-process (apply #'start-process process-args)))
|
(setq esup-child-process (apply #'start-process process-args)))
|
||||||
|
|
|
@ -300,7 +300,9 @@ If RETURN-P, return the message as a string instead of displaying it."
|
||||||
-q or -Q, for example:
|
-q or -Q, for example:
|
||||||
|
|
||||||
emacs -Q -l init.el -f doom|run-all-startup-hooks"
|
emacs -Q -l init.el -f doom|run-all-startup-hooks"
|
||||||
(dolist (hook (list 'after-init-hook 'delayed-warnings-hook
|
(run-hook-wrapped 'after-init-hook #'doom-try-run-hook)
|
||||||
|
(setq after-init-time (current-time))
|
||||||
|
(dolist (hook (list 'delayed-warnings-hook
|
||||||
'emacs-startup-hook 'term-setup-hook
|
'emacs-startup-hook 'term-setup-hook
|
||||||
'window-setup-hook))
|
'window-setup-hook))
|
||||||
(run-hook-wrapped hook #'doom-try-run-hook)))
|
(run-hook-wrapped hook #'doom-try-run-hook)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue