diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 39b5d8da2..396e70a3a 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -1,5 +1,19 @@ ;;; core/autoload/debug.el -*- lexical-binding: t; -*- +;;;###autoload +(defun doom-run-all-startup-hooks-h () + "Run all startup Emacs hooks. Meant to be executed after starting Emacs with +-q or -Q, for example: + + 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)) + (dolist (hook (list 'delayed-warnings-hook + 'emacs-startup-hook 'term-setup-hook + 'window-setup-hook)) + (run-hook-wrapped hook #'doom-try-run-hook))) + + ;; ;;; Helpers diff --git a/core/core.el b/core/core.el index f4c40ccb6..b1472d753 100644 --- a/core/core.el +++ b/core/core.el @@ -393,18 +393,6 @@ If RETURN-P, return the message as a string instead of displaying it." (or doom-init-time (setq doom-init-time (float-time (time-subtract (current-time) before-init-time)))))) -(defun doom-run-all-startup-hooks-h () - "Run all startup Emacs hooks. Meant to be executed after starting Emacs with --q or -Q, for example: - - 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)) - (dolist (hook (list 'delayed-warnings-hook - 'emacs-startup-hook 'term-setup-hook - 'window-setup-hook)) - (run-hook-wrapped hook #'doom-try-run-hook))) - (defun doom-load-autoloads-file (file) "Tries to load FILE (an autoloads file). Return t on success, throws an error in interactive sessions, nil otherwise (but logs a warning)."