aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 14:34:57 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 14:34:57 -0500
commit5e6d3b7aa5a298a43a063a30a02d9509008b1328 (patch)
tree8c3db22723d9749cb30d362b66c89aff26cf9ae5 /modules
parenta24d14bab5e07612dd2d3bf77021cbe1f9a9b253 (diff)
downloaddotemacs-5e6d3b7aa5a298a43a063a30a02d9509008b1328.tar.gz
dotemacs-5e6d3b7aa5a298a43a063a30a02d9509008b1328.zip
refactor: declare cross-module commands bound in custom keymaps
custom-ordering.el binds cj/org-sort-by-todo-and-priority (owned by org-config) and custom-text-enclose.el binds change-inner/change-outer (the change-inner package). Both work at runtime — org-config loads eagerly and text-config autoloads change-inner via use-package :commands — but byte-compiling either module standalone warned "not known to be defined", and the dependency was implicit. Added declare-function for each so the compile is clean and the cross-module relationship is explicit at the top of the file. No autoload needed: the runtime autoload/eager-load already exists, so only the compiler needed telling. custom-buffer-file.el byte-compiles clean already, so it needed no change.
Diffstat (limited to 'modules')
-rw-r--r--modules/custom-ordering.el4
-rw-r--r--modules/custom-text-enclose.el6
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/custom-ordering.el b/modules/custom-ordering.el
index 69a2d465c..ee2f2023f 100644
--- a/modules/custom-ordering.el
+++ b/modules/custom-ordering.el
@@ -23,6 +23,10 @@
(require 'cl-lib)
(require 'keybindings) ;; provides cj/custom-keymap
+;; Bound in the ordering keymap below but owned by org-config (loaded eagerly
+;; in init); declare it so byte-compiling this module standalone is clean.
+(declare-function cj/org-sort-by-todo-and-priority "org-config")
+
(defvar cj/ordering-map)
(defun cj/--arrayify (start end quote &optional prefix suffix)
diff --git a/modules/custom-text-enclose.el b/modules/custom-text-enclose.el
index e1b735a0c..e23674fff 100644
--- a/modules/custom-text-enclose.el
+++ b/modules/custom-text-enclose.el
@@ -23,6 +23,12 @@
(require 'keybindings) ;; provides cj/custom-keymap
+;; Bound in the enclose keymap below but owned by the change-inner package
+;; (autoloaded via text-config's `use-package :commands'); declare them so
+;; byte-compiling this module standalone is clean.
+(declare-function change-inner "change-inner")
+(declare-function change-outer "change-inner")
+
(defun cj/--surround (text surround-string)
"Internal implementation: Surround TEXT with SURROUND-STRING.
TEXT is the string to be surrounded.