From 4a8c572ba6a64be997be072b44ef5ff62674d820 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 21 Jun 2026 02:16:42 -0400 Subject: fix: load games-config via the malyon hook, not an autoload chain The previous deferral (03d8b587) autoloaded malyon to games-config, but games-config doesn't define malyon. It leaves the command to the malyon package, so M-x malyon loaded games-config, found malyon still undefined, and errored "Autoloading games-config.el failed to define function malyon". Emacs won't chain through a second autoload. malyon and 2048-game autoload their own commands via package.el, so games-config should never own them. init.el now loads games-config via (with-eval-after-load 'malyon ...), and games-config just sets malyon-stories-directory when malyon loads. M-x malyon loads the package as a real command, then games-config applies its config. The earlier batch check loaded the files by hand and missed the autoload failure. The new test resolves the autoload the way M-x does (autoload-do-load), so the real path is covered now. --- init.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index eab444d00..cda6aeb72 100644 --- a/init.el +++ b/init.el @@ -153,10 +153,10 @@ ;; ------------------------------- Entertainment ------------------------------- (require 'music-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) +;; games-config: deferred (load-graph Phase 4). malyon / 2048-game autoload +;; their own commands via package.el; games-config only supplies malyon's config, +;; so load it when malyon loads rather than requiring it at startup. +(with-eval-after-load 'malyon (require 'games-config)) ;; ------------------------------- Misc Modules -------------------------------- -- cgit v1.2.3