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/org-agenda-frame.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/org-agenda-frame.el') diff --git a/modules/org-agenda-frame.el b/modules/org-agenda-frame.el index b783e358..8fbcb390 100644 --- a/modules/org-agenda-frame.el +++ b/modules/org-agenda-frame.el @@ -45,10 +45,12 @@ (declare-function org-get-at-bol "org" (property)) (declare-function org-fold-show-context "org-fold" (&optional key)) (declare-function org-agenda "org-agenda" (&optional arg org-keys restriction)) -;; Forward references: defined later in this file (Phase 2 for -safe-redo, -;; the lifecycle block for -delete). -(declare-function cj/--agenda-frame-safe-redo "org-agenda-frame" ()) -(declare-function cj/--agenda-frame-delete "org-agenda-frame" ()) +;; No declare-function for -safe-redo / -delete: they are defined later in THIS +;; file, and the byte-compiler resolves same-file forward references at end of +;; compilation. A declare-function for a same-file function instead counts as a +;; second definition ("defined multiple times") and, worse, its declared arglist +;; overrides the real one for arg-count checking -- the empty () shadowed +;; -safe-redo's actual (&optional frame), disabling that check. (defconst cj/--agenda-frame-parameter 'cj/agenda-frame "Frame parameter marking the dedicated agenda frame. -- cgit v1.2.3