Skip to content

Commit 56ce6cc

Browse files
committed
fix(lib): modulep!: returning t for disabled modules
If passed negated flags. Fix: doomemacs#8289
1 parent bc3f0ce commit 56ce6cc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lisp/doom-lib.el

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,11 +1453,13 @@ To interpolate dynamic values, use comma:
14531453
14541454
For more about modules and flags, see `doom!'."
14551455
(if (keywordp group)
1456-
(if flags
1457-
`(doom-module--has-flag-p
1458-
(doom-module (backquote ,group) (backquote ,module) :flags)
1459-
(backquote ,flags))
1460-
`(and (get (backquote ,group) (backquote ,module)) t))
1456+
(let ((ctxtform `(get (backquote ,group) (backquote ,module))))
1457+
(if flags
1458+
`(when-let* ((ctxt ,ctxtform))
1459+
(doom-module--has-flag-p
1460+
(doom-module-context-flags ctxt)
1461+
(backquote ,flags)))
1462+
`(and ,ctxtform t)))
14611463
(let ((flags (delq nil (cons group (cons module flags)))))
14621464
(if (doom-module-context-index doom-module-context)
14631465
`(doom-module--has-flag-p

0 commit comments

Comments
 (0)