summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shtml.lisp16
1 files changed, 9 insertions, 7 deletions
diff --git a/shtml.lisp b/shtml.lisp
index 8f5d7f0..ac72d2c 100644
--- a/shtml.lisp
+++ b/shtml.lisp
@@ -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