diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-24 07:21:55 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-24 07:21:55 -0400 |
| commit | a134426c5e99717c65714fa2a57a5fa85da8630c (patch) | |
| tree | 6609a51d7e2abd28480f01d77d75f89812525b39 /modules | |
| parent | d7c3efa4d05eb0f3bd9d09af5954d3f41f86ba73 (diff) | |
| download | dotemacs-a134426c5e99717c65714fa2a57a5fa85da8630c.tar.gz dotemacs-a134426c5e99717c65714fa2a57a5fa85da8630c.zip | |
fix(elisp): make dead let-bindings of foreign special vars take effect
Byte-compile flagged three let-bindings of package vars as unused lexical variables — under lexical-binding they compiled to dead locals the package never saw, so the intended behavior silently never happened. Declare each var special so the binding is dynamic: music-config now actually suppresses the emms overwrite prompt on playlist save (emms-source-playlist-ask-before-overwrite) and turns off orderless smart-case for the music picker; org-roam copy-todo-to-today now actually applies its custom dailies capture template. Same class as the coverage-core json fix.
Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/music-config.el | 6 | ||||
| -rw-r--r-- | modules/org-roam-config.el | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/music-config.el b/modules/music-config.el index 55eb47d25..7c3af0e13 100644 --- a/modules/music-config.el +++ b/modules/music-config.el @@ -98,6 +98,12 @@ (require 'cj-window-toggle-lib) ;; side-window size memory (F10 toggle) (require 'system-lib) ;; cj/confirm-strong (overwrite confirms) +;; Declare these foreign package vars special so `let'-binding them below +;; compiles as a dynamic bind, not a dead lexical local -- otherwise emms / +;; orderless never see the binding (the lexical-binding foreign-special-var trap). +(defvar orderless-smart-case) +(defvar emms-source-playlist-ask-before-overwrite) + ;;; Settings (no Customize) (defvar cj/music-root music-dir diff --git a/modules/org-roam-config.el b/modules/org-roam-config.el index 218f37d68..40df688d9 100644 --- a/modules/org-roam-config.el +++ b/modules/org-roam-config.el @@ -27,6 +27,11 @@ (require 'user-constants) +;; Declared special so the `let'-binding in `cj/org-roam-copy-todo-to-today' +;; compiles as a dynamic bind, not a dead lexical local -- otherwise the custom +;; capture template never reaches org-roam-dailies (the foreign-special-var trap). +(defvar org-roam-dailies-capture-templates) + ;; ---------------------------------- Org Roam --------------------------------- (defconst cj/--org-roam-dailies-head |
