From 56ce6cc284e8f4dd0cb0704dde6694a1b8e500ed Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Feb 2025 15:18:32 -0500 Subject: [PATCH] fix(lib): modulep!: returning t for disabled modules If passed negated flags. Fix: #8289 --- lisp/doom-lib.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/doom-lib.el b/lisp/doom-lib.el index ab4788829..dc2455165 100644 --- a/lisp/doom-lib.el +++ b/lisp/doom-lib.el @@ -1453,11 +1453,13 @@ To interpolate dynamic values, use comma: For more about modules and flags, see `doom!'." (if (keywordp group) - (if flags - `(doom-module--has-flag-p - (doom-module (backquote ,group) (backquote ,module) :flags) - (backquote ,flags)) - `(and (get (backquote ,group) (backquote ,module)) t)) + (let ((ctxtform `(get (backquote ,group) (backquote ,module)))) + (if flags + `(when-let* ((ctxt ,ctxtform)) + (doom-module--has-flag-p + (doom-module-context-flags ctxt) + (backquote ,flags))) + `(and ,ctxtform t))) (let ((flags (delq nil (cons group (cons module flags))))) (if (doom-module-context-index doom-module-context) `(doom-module--has-flag-p