forked from FG42/FG42
1
0
Fork 0

Fix the fg42/config-when macro

This commit is contained in:
Sameer Rahmani 2024-04-30 11:31:05 +01:00
parent a163cdc33e
commit 73f574795a
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
1 changed files with 2 additions and 5 deletions

View File

@ -45,12 +45,9 @@
(defmacro fg42/config-when (key value &rest body)
"Run the BODY only if config KEY has the VALUE."
(declare (indent defun))
(message ">> %s %s %s" key value (string= (fg42/config-get-or key) value))
(if (fg42/config= key value)
(when (eval `(fg42/config= ,key ,value))
`(progn
,@body)
`(progn
(message "nooooo"))))
,@body)))
(defmacro with-config (name &rest body)