fix: ensure module state is in scope for modulep!

Otherwise, doom-module-from-path (and modulep!) would fail to detect the
module they're in, or at least, modulep! would incorrectly return nil,
even for enabled modules.

This issue is what would've caused the package list or the doctor to
include/consider packages in disabled modules or behind disabled flags.
This commit is contained in:
Henrik Lissner 2022-09-10 18:59:02 +02:00
parent ce0e3a04b6
commit 45a66cda60
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 14 additions and 7 deletions

View file

@ -247,7 +247,9 @@ in."
(let (doom-doctor--errors
doom-doctor--warnings)
(condition-case-unless-debug ex
(let ((doctor-file (doom-module-path (car key) (cdr key) "doctor.el"))
(let ((doom--current-module key)
(doom--current-flags (plist-get plist :flags))
(doctor-file (doom-module-path (car key) (cdr key) "doctor.el"))
(packages-file (doom-module-path (car key) (cdr key) "packages.el")))
(cl-loop with doom-output-indent = 6
for name in (let (doom-packages