From 07171185bb56629623d003467c6228326d6c2259 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 26 Sep 2022 02:08:07 +0200 Subject: [PATCH] fix: doom-module-context: nil doom-module-context If a module isn't enabled, this should silently set the context to an empty array, not nil, which causes a (aref nil 2) type error. --- lisp/doom-modules.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/doom-modules.el b/lisp/doom-modules.el index bd8435f63..c3e91cbba 100644 --- a/lisp/doom-modules.el +++ b/lisp/doom-modules.el @@ -139,7 +139,7 @@ If NAME is omitted, GROUP is treated as a module key cons cell: (GROUP . NAME)." (let* ((key (if name (cons group name) group)) (group (or (car-safe key) key)) (name (cdr-safe key)) - (data (get group name))) + (data (or (get group name) doom--empty-module))) (vector group name (aref data (doom-module--context-field flags)) (aref data (doom-module--context-field features)))))