diff --git a/early-init.el b/early-init.el index aca65d2..113f261 100644 --- a/early-init.el +++ b/early-init.el @@ -38,7 +38,7 @@ This applies values in `+emacs--startup-restore-alist'." "Set VARIABLE to VALUE during startup, but restore to RESTORE. If RESTORE is nil or not passed, save the original value and restore that." - (unless nil ;after-init-time + (unless after-init-time (setf (alist-get variable +emacs--startup-restore-alist) (or restore (symbol-value variable))) (set-default variable value))) @@ -51,7 +51,8 @@ restore that." (+set-during-startup 'inhibit-message t) ;; Debug during init -(+set-during-startup 'debug-on-error t) +(unless (eq debug-on-error 'startup) + (+set-during-startup 'debug-on-error 'init)) ;;; Set up extra load paths and functionality @@ -138,10 +139,11 @@ See `no-littering' for examples.") ;; Setup `setup' (add-to-list 'setup-modifier-list 'setup-wrap-to-demote-errors) -;; (advice-add 'setup :before (defun +setup-before (&rest args) -;; (message "Setup: %S" args))) -;; (advice-add 'setup :after (defun +setup-after (&rest args) -;; (message "Setup: %S...Done." args))) +(unless (memq debug-on-error '(nil init)) + (define-advice setup (:before (head &rest args) +setup-before) + (message "[Setup] %S" head)) + (define-advice setup (:after (head &rest args) +setup-after) + (message "[Setup] %S...done" head))) ;;; Appendix