Move doom-run-all-startup-hooks-h to autoload/debug.el

This commit is contained in:
Henrik Lissner 2019-07-28 02:31:52 +02:00
parent aee1c851fc
commit a6d77e951f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 14 additions and 12 deletions

View file

@ -1,5 +1,19 @@
;;; core/autoload/debug.el -*- lexical-binding: t; -*- ;;; 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 ;;; Helpers

View file

@ -393,18 +393,6 @@ If RETURN-P, return the message as a string instead of displaying it."
(or doom-init-time (or doom-init-time
(setq doom-init-time (float-time (time-subtract (current-time) before-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) (defun doom-load-autoloads-file (file)
"Tries to load FILE (an autoloads file). Return t on success, throws an error "Tries to load FILE (an autoloads file). Return t on success, throws an error
in interactive sessions, nil otherwise (but logs a warning)." in interactive sessions, nil otherwise (but logs a warning)."