From cce6e8265db0eea8af192b3737b50b81c39a9c0b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 16 May 2026 04:15:32 -0500 Subject: 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. --- modules/nerd-icons-config.el | 15 ++++++++++----- 1 file 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 -- cgit v1.2.3