aboutsummaryrefslogtreecommitdiffstats
path: root/who.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-08-22 21:10:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-08-22 21:10:47 -0700
commit4ee3dfeeed77c83c0a5929efeffbe0c6cb29abf6 (patch)
treed236cfa44cb0a41f93988c0af5b4c25c7af360e3 /who.tl
parent6cd86e8975528a9ca5cbf12285724b99b63db4c6 (diff)
downloadtl-who-master.tar.gz
tl-who-master.tar.bz2
tl-who-master.zip
deftag: return the keyword.HEADtl-who-master
* README.md: Document that deftag returns the keyword symbol that is being defined as the tag. * who.tl (deftag): Return the keyword parameter instead of the generated lambda.
Diffstat (limited to 'who.tl')
-rw-r--r--who.tl16
1 files changed, 9 insertions, 7 deletions
diff --git a/who.tl b/who.tl
index 12ce78d..794645c 100644
--- a/who.tl
+++ b/who.tl
@@ -341,10 +341,12 @@
(key-params (if (consp attr-param-list)
(butlast attr-param-list 0))))
(with-gensyms (body-arg)
- ^(set [*tag-macro* ,keyword]
- (lambda (:key ,body-arg -- ,*attr-param-list)
- (mac-env-param-bind *cur-form* *cur-env* ,body-pattern ,body-arg
- ,*(if (and rest-param key-params)
- ^((set ,rest-param
- (scrub-kw-args ',key-params ,rest-param))))
- ,*body))))))
+ ^(progn
+ (set [*tag-macro* ,keyword]
+ (lambda (:key ,body-arg -- ,*attr-param-list)
+ (mac-env-param-bind *cur-form* *cur-env* ,body-pattern ,body-arg
+ ,*(if (and rest-param key-params)
+ ^((set ,rest-param
+ (scrub-kw-args ',key-params ,rest-param))))
+ ,*body)))
+ ,keyword))))