From a02e924a4457266901e6b3ee3b56f4595845d535 Mon Sep 17 00:00:00 2001 From: paku Date: Mon, 27 May 2024 18:33:55 +0900 Subject: [PATCH] Improve defhsx --- src/hsx.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hsx.lisp b/src/hsx.lisp index e278ff6..2d1e951 100644 --- a/src/hsx.lisp +++ b/src/hsx.lisp @@ -13,10 +13,11 @@ ;;;; hsx definitions (defmacro defhsx (name element-type) - `(defmacro ,name (&body body) - (multiple-value-bind (props children) - (parse-body body) - `(create-element ,',element-type (list ,@props) ,@children)))) + (eval-when (:compile-toplevel :load-toplevel :execute) + `(defmacro ,name (&body body) + (multiple-value-bind (props children) + (parse-body body) + `(create-element ,',element-type (list ,@props) ,@children))))) (defun parse-body (body) (if (keywordp (first body))