From cb08bf8754b09222081a571dc4134d5568d61012 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 24 Jul 2026 16:23:34 -0500 Subject: 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. --- modules/dashboard-config.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'modules/dashboard-config.el') 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 -- cgit v1.2.3