diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 02:31:43 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 02:31:43 -0500 |
| commit | dd471327dbea035ba846242cf9419dc67db6aaa6 (patch) | |
| tree | 101fb87451b8830a00bcb3b8e8d5c81a11ff9d4e /modules | |
| parent | 461e07277fdb491ccc490b5e232fa8d2b16639e0 (diff) | |
| download | dotemacs-dd471327dbea035ba846242cf9419dc67db6aaa6.tar.gz dotemacs-dd471327dbea035ba846242cf9419dc67db6aaa6.zip | |
fix(system-commands): require keybindings at load time, not just compile time
The module had `(eval-when-compile (require 'keybindings))`, which
silences the byte-compiler but doesn't make `cj/custom-keymap'
available when the module is required. The top-level
`(keymap-set cj/custom-keymap "!" cj/system-command-map)' at the tail
of the file then fails with `void-variable cj/custom-keymap'.
Normal Emacs startup happened to work because `init.el' requires
`keybindings' before `system-commands'. But requiring the module in
isolation -- including from `make test-file
FILE=test-system-commands-resolve-and-run.el' -- blows up.
Fix: use a plain `(require 'keybindings)' so the load-time
dependency matches the load-time reference.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/system-commands.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/system-commands.el b/modules/system-commands.el index 64eb5e796..bd22468c9 100644 --- a/modules/system-commands.el +++ b/modules/system-commands.el @@ -19,7 +19,12 @@ ;; ;;; Code: -(eval-when-compile (require 'keybindings)) +;; `keybindings' provides `cj/custom-keymap', which is referenced at load +;; time by the `keymap-set' call at the tail of this file. An +;; `eval-when-compile' require would silence the byte-compiler but leave +;; the load-time reference void if anything required `system-commands' +;; before `keybindings'. Make the dependency explicit. +(require 'keybindings) (eval-when-compile (require 'subr-x)) (require 'rx) |
