diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-24 09:51:38 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-24 09:51:38 -0400 |
| commit | 6e667d18d7295b5fddaced070dece798212ce2fd (patch) | |
| tree | f268592301d7aac8ac8e2bf2f089aff47b8b1d95 /modules/config-utilities.el | |
| parent | 53c20d92c0bc7698446de8711c8705c14ee70cc5 (diff) | |
| download | dotemacs-6e667d18d7295b5fddaced070dece798212ce2fd.tar.gz dotemacs-6e667d18d7295b5fddaced070dece798212ce2fd.zip | |
chore(elisp): clear byte-compile warnings (calibredb, config-utilities, tramp, diff, chrono, auth)
Add declare-function/defvar declarations for lazily-loaded package functions and variables so each module compiles cleanly standalone; config-utilities wraps two lazy EmacSQL oref slot reads in with-no-warnings. No behavior change.
Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
Diffstat (limited to 'modules/config-utilities.el')
| -rw-r--r-- | modules/config-utilities.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/config-utilities.el b/modules/config-utilities.el index b3eec5d3d..f448327c1 100644 --- a/modules/config-utilities.el +++ b/modules/config-utilities.el @@ -21,6 +21,19 @@ (require 'find-lisp) (require 'profiler) +;; External variables referenced at runtime only (org and the native +;; compiler are loaded lazily; declare to quiet the byte-compiler). +(defvar comp-async-report-warnings-errors) +(defvar org-ts-regexp) +(defvar org-agenda-files) + +;; External functions referenced at runtime only. +(declare-function org-element-parse-buffer "org-element") +(declare-function org-element-map "org-element") +(declare-function org-element-property "org-element-ast") +(declare-function org-time-string-to-absolute "org") +(declare-function org-alert-check "org-alert") + ;;; -------------------------------- Debug Keymap ------------------------------- (defvar-keymap cj/debug-config-keymap @@ -65,13 +78,15 @@ (with-eval-after-load 'emacsql-sqlite-builtin (cl-defmethod emacsql-close :around ((connection emacsql-sqlite-builtin-connection)) - (when (oref connection handle) + ;; The class is loaded lazily, so the slot is unknown at compile time. + (when (with-no-warnings (oref connection handle)) (cl-call-next-method)))) (with-eval-after-load 'emacsql-sqlite-module (cl-defmethod emacsql-close :around ((connection emacsql-sqlite-module-connection)) - (when (oref connection handle) + ;; The class is loaded lazily, so the slot is unknown at compile time. + (when (with-no-warnings (oref connection handle)) (cl-call-next-method)))) ;;; -------------------------------- Benchmarking ------------------------------- |
