aboutsummaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-21 01:57:44 -0400
committerCraig Jennings <c@cjennings.net>2026-06-21 01:57:44 -0400
commit03d8b587b1f49073d94bd0c4114fe09e832183f8 (patch)
treec4b1c5e2289206bbd70563c866f4882d19221ac8 /init.el
parentc4a36132d537f7dd5a7c8e429cbd9b0ec4e44abe (diff)
downloaddotemacs-03d8b587b1f49073d94bd0c4114fe09e832183f8.tar.gz
dotemacs-03d8b587b1f49073d94bd0c4114fe09e832183f8.zip
refactor: defer games-config behind autoloads (load-graph Phase 4)
init.el eagerly required games-config at startup just to configure two on-demand game packages. package.el already autoloads malyon and 2048-game, so the eager require bought nothing but the one setting the module adds (malyon-stories-directory). init.el now autoloads malyon and 2048-game to games-config instead of requiring it. The first game command loads the module, which configures then loads the package. Startup no longer touches games-config, and both the commands and the stories-directory setting still work. This is the first module of the Phase 4 low-risk batch.
Diffstat (limited to 'init.el')
-rw-r--r--init.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/init.el b/init.el
index cf6b75bd4..eab444d00 100644
--- a/init.el
+++ b/init.el
@@ -153,7 +153,10 @@
;; ------------------------------- Entertainment -------------------------------
(require 'music-config)
-(require 'games-config)
+;; games-config: deferred (load-graph Phase 4). malyon / 2048-game autoload the
+;; module, so it loads on first use instead of at startup.
+(autoload 'malyon "games-config" "Play interactive fiction; loads games-config." t)
+(autoload '2048-game "games-config" "Play 2048; loads games-config." t)
;; ------------------------------- Misc Modules --------------------------------