mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-07 12:47:30 -05:00
fix(lib): with-doom-module: nil -> empty doom-module-context
Would throw an "Invalid key: nil" error if KEY was `nil`.
Fix: #8176
Amend: 8cafbe4408
This commit is contained in:
@ -1261,7 +1261,9 @@ Never set this variable directly, use `with-doom-module'.")
|
|||||||
(defmacro with-doom-module (key &rest body)
|
(defmacro with-doom-module (key &rest body)
|
||||||
"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 (doom-module-context ,key)))
|
`(let ((doom-module-context
|
||||||
|
(or (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