diff options
Diffstat (limited to 'shtml.lisp')
-rw-r--r-- | shtml.lisp | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -4,8 +4,10 @@ (loop :for (i . j) :in lst :when j :append (list i j))) -(defun downcase-name (s) - (string-downcase (symbol-name s))) +(eval-when + (:compile-toplevel) + (defun downcase-name (s) + (string-downcase (symbol-name s)))) (defun separate-keys (lst) (let (keys body) @@ -31,11 +33,11 @@ (let ((body (gensym)) (parsed-args (separate-keys ,args))) `((lambda (,body &key ,@',attrs) - (format nil "<~a~{ ~a=~s~}>~{~a~^ ~}</~a>" - ,,tag-name - (trim-flatten-assoc ,',attrs-and-values) - ,body - ,,tag-name)) ,@parsed-args))) + (format nil "<~a~{ ~a=~s~}>~{~a~^ ~}</~a>" + ,,tag-name + (trim-flatten-assoc ,',attrs-and-values) + ,body + ,,tag-name)) ,@parsed-args))) `(defun ,tag (&key ,@attrs) (format nil "<~a ~{~a=~s~^ ~}>" ,tag-name |