diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-24 16:23:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-24 16:23:34 -0500 |
| commit | cb08bf8754b09222081a571dc4134d5568d61012 (patch) | |
| tree | ad068dc2062d2d17773309c932c38afaa63e7fa3 /modules/org-agenda-frame.el | |
| parent | c24dbe25d25bee514393b54bc3cbd5e7d638fd9b (diff) | |
| download | dotemacs-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/org-agenda-frame.el')
| -rw-r--r-- | modules/org-agenda-frame.el | 10 |
1 files changed, 6 insertions, 4 deletions
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. |
