[cl-who-devel] Macroexpansion of with-html-output body?
Vsevolod
vseloved at gmail.com
Sun Jul 6 19:19:19 UTC 2008
I have experimented with the solution, that I've sent previously and
have found out, that it's better to place the macroexpansion part in
the TREE-TO-TEMPLATE function (instead of TREE-TO-COMMANDS). Thus it's
possible to support nested EMB's.
The diff looks like this:
@@ -11,12 +11,10 @@
;; normal tag
(process-tag element #'tree-to-template))
((listp element)
- ;; most likely a normal Lisp form (check if we
- ;; have nested HTM subtrees) or an EMB form
+ ;; most likely a normal Lisp form - check if we
+ ;; have nested HTM subtrees
(list
- (if (eql (car element) 'emb)
- (replace-htm (list 'htm (macroexpand-1 (cadr element)))
#'tree-to-template)
- (replace-htm element #'tree-to-template))))
+ (replace-htm element #'tree-to-template)))
(t
(if *indent*
(list +newline+ (n-spaces *indent*) element)
-
Vsevolod
More information about the Cl-who-devel
mailing list