mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix: "Invalid key: nil" errors in some eval contexts
Breaking `gr` (+eval:region) et co in files outside of Doom's source (like in packages). Fix: #8224
This commit is contained in:
@ -1158,8 +1158,10 @@ Never set this variable directly, use `with-doom-module'.")
|
|||||||
"Evaluate BODY with `doom-module-context' informed by KEY."
|
"Evaluate BODY with `doom-module-context' informed by KEY."
|
||||||
(declare (indent 1))
|
(declare (indent 1))
|
||||||
`(let ((doom-module-context
|
`(let ((doom-module-context
|
||||||
(or (doom-module-context ,key)
|
(let ((key ,key))
|
||||||
(make-doom-module-context))))
|
(if key
|
||||||
|
(doom-module-context key)
|
||||||
|
(make-doom-module-context)))))
|
||||||
(doom-log ":context:module: =%s" doom-module-context)
|
(doom-log ":context:module: =%s" doom-module-context)
|
||||||
,@body))
|
,@body))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user