aboutsummaryrefslogtreecommitdiff
path: root/modules/dashboard-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-24 16:23:34 -0500
committerCraig Jennings <c@cjennings.net>2026-07-24 16:23:34 -0500
commitcb08bf8754b09222081a571dc4134d5568d61012 (patch)
treead068dc2062d2d17773309c932c38afaa63e7fa3 /modules/dashboard-config.el
parentc24dbe25d25bee514393b54bc3cbd5e7d638fd9b (diff)
downloaddotemacs-cb08bf8754b09222081a571dc4134d5568d61012.tar.gz
dotemacs-cb08bf8754b09222081a571dc4134d5568d61012.zip
refactor: clear six byte-compile warnings across four modules
- org-agenda-frame declared two of its own functions with declare-function. - Same-file forward refs resolve at end of compile, so those were redundant. - Worse, the declared empty arglist overrode safe-redo's real (&optional frame). - That silently disabled arg-count checking on it; removed both declarations. - music-config and video-audio-recording referenced three vars before their defvars. - Added forward declarations so each compiles as a dynamic binding. - dashboard declared el special, which made the section macro's own binding shadow it. - Removed that declaration; el is the macro's lexical binding and resolves cleanly. - Declared wttrin, the last undefined-function reference in the launcher table.
Diffstat (limited to 'modules/dashboard-config.el')
-rw-r--r--modules/dashboard-config.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el
index 8507344d..c7ff39dc 100644
--- a/modules/dashboard-config.el
+++ b/modules/dashboard-config.el
@@ -73,6 +73,7 @@
;; External package commands invoked by launchers.
(declare-function mu4e "mu4e")
(declare-function pearl-list-issues "pearl")
+(declare-function wttrin "wttrin")
;; ------------------------ Dashboard Bookmarks Override -----------------------
;; overrides the bookmark insertion from the dashboard package to provide an
@@ -84,13 +85,13 @@
(defvar dashboard-bookmarks-item-format "%s"
"Format to use when showing the base of the file name.")
-;; `el' is bound dynamically by dashboard's section-insertion machinery, which the
-;; override below plugs into. Declare it so the byte-compiler reads the
-;; references as that special variable rather than a free variable. The name is
-;; dashboard's, not ours, so the missing-prefix lint is suppressed rather than
-;; renamed (renaming would break the dynamic binding dashboard supplies).
-(with-suppressed-warnings ((lexical el))
- (defvar el))
+;; No `(defvar el)' here on purpose. `el' is the per-item variable that
+;; dashboard's `dashboard-insert-section' macro binds inside its own expansion;
+;; the override's forms below reference it within that binding. Declaring `el'
+;; special (as an earlier attempt did) is what CREATED a byte-compile warning --
+;; it turned the macro's ordinary lexical binding into one that "shadows the
+;; dynamic variable el". Left lexical, the references resolve inside the
+;; expansion and the compile is clean.
;; The override body uses the `dashboard-insert-section' MACRO, so it must be
;; known when this module byte-compiles or the call compiles as a plain