From 36a453d2c1237b49f594b23433858a0146dbf31e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 24 May 2026 18:36:19 -0500 Subject: refactor(load-graph): make hidden module dependencies explicit Phase 2 of the load-graph project. I fixed the seven hidden dependencies the classification surfaced, so each module declares what it uses instead of relying on init order. - system-defaults now requires host-environment and user-constants at runtime. They were eval-when-compile only, but env-bsd-p and user-home-dir are read at load, so the compiled module couldn't load standalone. - custom-buffer-file, dev-fkeys, calendar-sync, and video-audio-recording require keybindings and drop their (when (boundp 'cj/custom-keymap) ...) shims. The shim silently dropped the C-; binding when the module loaded before keybindings. The explicit require makes the dependency real. - flycheck-config and mail-config require keybindings for their cj/custom-keymap bindings (a use-package :map and a direct keymap-set). - Removed a dead eval-when-compile (defvar cj/custom-keymap) in transcription-config; nothing there used the variable. No init.el load-order change. keybindings and the foundation modules already load before these, so the requires are no-ops at startup and only fix standalone and test loading. I verified each fix with a fresh emacs --batch (require 'X), then swept all modules standalone: every one loads or fails only with a clear missing-package message. Full make test, make validate-modules, and an init smoke all pass. Module headers and the inventory's hidden-dependency section are updated to mark the seven resolved. --- modules/mail-config.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/mail-config.el') diff --git a/modules/mail-config.el b/modules/mail-config.el index 5050d761..e1ebdfce 100644 --- a/modules/mail-config.el +++ b/modules/mail-config.el @@ -10,10 +10,8 @@ ;; command-loaded deferral candidate for Phase 5. ;; Top-level side effects: registers cj/email-map under cj/custom-keymap, one ;; add-hook, two advice-add, one global key, package config. -;; Runtime requires: user-constants, system-lib, mu4e-attachments. keybindings -;; is needed for the C-; e registration but is not required, so the module -;; errors standalone. Phase 2 fix. -;; Direct test load: conditional (needs cj/custom-keymap from keybindings). +;; Runtime requires: user-constants, system-lib, mu4e-attachments, keybindings. +;; Direct test load: yes (requires keybindings; mu4e package must be present). ;; ;; I found Aime Bertrand's blog post to be an excellent walkthrough of how to ;; setup a Mu4e config. @@ -34,6 +32,7 @@ (require 'user-constants) (require 'system-lib) (require 'mu4e-attachments) +(require 'keybindings) ;; provides cj/custom-keymap ;; cj/custom-keymap's real binding is in keybindings.el, which init.el loads ;; first. The use-package org-msg :preface below wraps in eval-and-compile, so -- cgit v1.2.3