aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 16:13:01 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 16:13:01 -0500
commit2d83f8f55977dbf69f4f80e490ed0b96aeea4eee (patch)
tree32c5ad0e360e0e15fed1ec83cd967991149b5cc3 /modules
parent9a0560e87867dc2a23767f66940ba4fb4d5a5c20 (diff)
downloaddotemacs-2d83f8f55977dbf69f4f80e490ed0b96aeea4eee.tar.gz
dotemacs-2d83f8f55977dbf69f4f80e490ed0b96aeea4eee.zip
docs(load-graph): seed module inventory and annotate foundation headers
I started the init.el load-graph classification with the foundation batch. I added docs/design/module-inventory.org as the living per-module inventory and annotated the seven foundation modules (system-lib, user-constants, host-environment, system-defaults, keyboard-compat, keybindings, config-utilities) with the load-graph header contract: layer, category, load shape, eager reason, top-level side effects, runtime requires, and direct-test-load safety. I changed no load order, so init.el keeps its current eager order. The inventory records one hidden dependency for Phase 2: system-defaults uses host-environment and user-constants symbols at load while declaring them eval-when-compile, so the compiled module cannot load standalone.
Diffstat (limited to 'modules')
-rw-r--r--modules/config-utilities.el9
-rw-r--r--modules/host-environment.el11
-rw-r--r--modules/keybindings.el11
-rw-r--r--modules/keyboard-compat.el12
-rw-r--r--modules/system-defaults.el15
-rw-r--r--modules/system-lib.el10
-rw-r--r--modules/user-constants.el12
7 files changed, 78 insertions, 2 deletions
diff --git a/modules/config-utilities.el b/modules/config-utilities.el
index 4ed086d1..b3eec5d3 100644
--- a/modules/config-utilities.el
+++ b/modules/config-utilities.el
@@ -2,6 +2,15 @@
;; author Craig Jennings <c@cjennings.net>
;;; Commentary:
+;;
+;; Layer: 1 (Foundation).
+;; Category: C/O.
+;; Load shape: eager.
+;; Eager reason: the C-c d debug keymap is kept available during config work.
+;; Top-level side effects: defines `cj/debug-config-keymap', binds it to C-c d.
+;; Runtime requires: cl-lib, cl-generic, eieio, find-lisp, profiler.
+;; Direct test load: yes (defines a keymap and helpers; batch-safe).
+;;
;; Development and debugging utilities for Emacs configuration maintenance.
;;
;;; Code:
diff --git a/modules/host-environment.el b/modules/host-environment.el
index e9887766..0afb39cb 100644
--- a/modules/host-environment.el
+++ b/modules/host-environment.el
@@ -2,6 +2,17 @@
;; author Craig Jennings <c@cjennings.net>
;;; Commentary:
+;;
+;; Layer: 1 (Foundation).
+;; Category: F/L.
+;; Load shape: eager.
+;; Eager reason: host predicates (laptop-p, battery presence) used by other
+;; foundation/UI modules deciding behavior at startup.
+;; Top-level side effects: none.
+;; Runtime requires: none (battery loaded on demand; declared via
+;; `declare-function').
+;; Direct test load: yes (pure predicates; batch-safe).
+;;
;; Convenience functions to report about the host environment
;;
;;; Code:
diff --git a/modules/keybindings.el b/modules/keybindings.el
index 462fde24..6e8adeac 100644
--- a/modules/keybindings.el
+++ b/modules/keybindings.el
@@ -3,6 +3,17 @@
;;
;;; Commentary:
;;
+;; Layer: 1 (Foundation).
+;; Category: F/C.
+;; Load shape: eager.
+;; Eager reason: owns `cj/custom-keymap' and the global C-; prefix that feature
+;; modules register into; must exist before they load.
+;; Top-level side effects: defines `cj/custom-keymap'/`cj/jump-map', binds
+;; global keys (C-;, C-z, and others), registers which-key labels after-load.
+;; Runtime requires: user-constants (currently eval-when-compile only),
+;; which-key, free-keys.
+;; Direct test load: conditional (binds global keys; needs user-constants).
+;;
;; Global keybinding configuration and custom keymap framework.
;;
;; Main features include:
diff --git a/modules/keyboard-compat.el b/modules/keyboard-compat.el
index 22263e9c..914a343a 100644
--- a/modules/keyboard-compat.el
+++ b/modules/keyboard-compat.el
@@ -2,7 +2,17 @@
;; author: Craig Jennings <c@cjennings.net>
;;; Commentary:
-
+;;
+;; Layer: 1 (Foundation).
+;; Category: F/S.
+;; Load shape: eager.
+;; Eager reason: normalizes terminal/GUI key input so the first session's
+;; keybindings resolve consistently.
+;; Top-level side effects: adds `cj/keyboard-compat-terminal-setup' to
+;; `emacs-startup-hook'.
+;; Runtime requires: host-environment.
+;; Direct test load: yes (registers a startup hook; batch-safe).
+;;
;; This module fixes keyboard input differences between terminal and GUI Emacs.
;;
;; THE PROBLEM: Meta+Shift keybindings behave differently in terminal vs GUI
diff --git a/modules/system-defaults.el b/modules/system-defaults.el
index d0b9f835..33d93bbc 100644
--- a/modules/system-defaults.el
+++ b/modules/system-defaults.el
@@ -2,6 +2,21 @@
;; author: Craig Jennings <c@cjennings.net>
;;
;;; Commentary:
+;;
+;; Layer: 1 (Foundation).
+;; Category: F/S.
+;; Load shape: eager.
+;; Eager reason: establishes core Emacs behavior (encoding, clipboard,
+;; scrolling, kill/quit defaults) the first interactive session relies on.
+;; Top-level side effects: mutates global defaults (many `setq'), advises
+;; `display-warning', adds a `display-buffer-alist' entry, remaps one global
+;; key.
+;; Runtime requires: autorevert, server, bookmark; host-environment
+;; (`env-bsd-p') and user-constants (`user-home-dir') are read at load but
+;; currently only required via eval-when-compile — Phase 2 to make explicit.
+;; Direct test load: conditional (host-environment and user-constants must load
+;; first; the compiled module cannot resolve them standalone yet).
+;;
;; Loads during init to set sane defaults: UTF-8 everywhere, quiet prompts, synced clipboards,
;; and hands-off async shell buffers. Nothing to call—just launch Emacs and the environment is ready.
;; Native compilation is tuned for performance and its warnings get logged to comp-warnings.log.
diff --git a/modules/system-lib.el b/modules/system-lib.el
index 80175958..333c15ee 100644
--- a/modules/system-lib.el
+++ b/modules/system-lib.el
@@ -1,6 +1,16 @@
;;; system-lib.el --- System utility library functions -*- lexical-binding: t; -*-
;;
;;; Commentary:
+;;
+;; Layer: 1 (Foundation).
+;; Category: F/L.
+;; Load shape: eager.
+;; Eager reason: low-level helpers (executable lookup, process output, silent
+;; logging) used by many eager modules during startup.
+;; Top-level side effects: none.
+;; Runtime requires: none (auth-source loaded on demand inside the helper).
+;; Direct test load: yes (pure helpers; batch-safe).
+;;
;; This module provides low-level system utility functions for checking
;; the availability of external programs and system capabilities.
;;
diff --git a/modules/user-constants.el b/modules/user-constants.el
index 2cc4a50c..293bc806 100644
--- a/modules/user-constants.el
+++ b/modules/user-constants.el
@@ -1,7 +1,17 @@
;;; user-constants.el --- User Constants -*- lexical-binding: t; coding: utf-8; -*-
;; author: Craig Jennings <c@cjennings.net>
;;; Commentary:
-
+;;
+;; Layer: 1 (Foundation).
+;; Category: F.
+;; Load shape: eager.
+;; Eager reason: defines the path constants referenced across the config and
+;; creates the required directories/files before other modules load.
+;; Top-level side effects: file writes — creates configured directories and
+;; stub files via `cj/initialize-user-directories-and-files' at load.
+;; Runtime requires: none.
+;; Direct test load: conditional (touches the filesystem on load).
+;;
;; This module defines important file and directory paths used throughout the
;; Emacs configuration, and ensures they exist during startup.
;;