aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-16 04:15:32 -0500
committerCraig Jennings <c@cjennings.net>2026-05-16 04:15:32 -0500
commitcce6e8265db0eea8af192b3737b50b81c39a9c0b (patch)
treed6905bf6738c09c2f3fb14dc406a2ba138cc53ff
parent500687f8d7d5b87ceb33fd959e545746ec9db1ba (diff)
downloaddotemacs-cce6e8265db0eea8af192b3737b50b81c39a9c0b.tar.gz
dotemacs-cce6e8265db0eea8af192b3737b50b81c39a9c0b.zip
fix(nerd-icons): restore `:demand t' so dashboard-config can load
Commit d618bb46's defer change broke startup with a `void-function nerd-icons-faicon' error. `dashboard-config.el' calls `nerd-icons-faicon' / `nerd-icons-mdicon' / `nerd-icons-devicon' at load time to build `dashboard-navigator-buttons', so nerd-icons must be loaded eagerly before dashboard-config requires. The "defer for batch and headless" intent doesn't hold here -- dashboard loads unconditionally at startup, so nerd-icons does too either way. Kept the `with-eval-after-load 'nerd-icons' safety net for the re-evaluation case (advice still attaches if this module is re-required after nerd-icons already loaded). Comment in the file records why deferral isn't workable here so a future cleanup pass doesn't try the same change again.
-rw-r--r--modules/nerd-icons-config.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/nerd-icons-config.el b/modules/nerd-icons-config.el
index 52a4627d..d314be80 100644
--- a/modules/nerd-icons-config.el
+++ b/modules/nerd-icons-config.el
@@ -69,16 +69,21 @@ every call. The `memq' check skips when the face is already present."
;; ------------------------------- Packages ------------------------------------
+;; `:demand t' is required: `dashboard-config.el' calls
+;; `nerd-icons-faicon' / `nerd-icons-mdicon' / `nerd-icons-devicon' at
+;; load time to build `dashboard-navigator-buttons', so nerd-icons must
+;; be loaded eagerly before dashboard-config requires. The earlier
+;; deferral attempt (commit d618bb46) broke startup with a
+;; `void-function nerd-icons-faicon' error.
(use-package nerd-icons
- :defer t
+ :demand t
:config
(advice-add 'nerd-icons-icon-for-dir :filter-return #'cj/--nerd-icons-color-dir)
(cj/nerd-icons-apply-tint))
-;; If nerd-icons is already loaded (e.g. when this module is re-evaluated
-;; after a session in which a feature module already required it), the
-;; `:config' block above won't fire again -- fall through to install the
-;; advice and tint immediately.
+;; Safety net: if this module is re-evaluated in a running Emacs where
+;; nerd-icons is already loaded, `:config' above won't fire again --
+;; ensure the advice and tint still apply.
(with-eval-after-load 'nerd-icons
(unless (advice-member-p #'cj/--nerd-icons-color-dir 'nerd-icons-icon-for-dir)
(advice-add 'nerd-icons-icon-for-dir