diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-12-13 20:44:23 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-12-13 20:44:23 -0800 |
commit | 9ae286b5a405f52cd83a0d2f6f8ee348e86b824e (patch) | |
tree | 93f618f4fb32b4224a873e8e94dc85020b4e34f8 /share | |
parent | 4f0c5f1273cb756b886f3a63930e8aa8698aa5c2 (diff) | |
download | txr-9ae286b5a405f52cd83a0d2f6f8ee348e86b824e.tar.gz txr-9ae286b5a405f52cd83a0d2f6f8ee348e86b824e.tar.bz2 txr-9ae286b5a405f52cd83a0d2f6f8ee348e86b824e.zip |
Adding prog and prog* macros.
* lisplib.c (tagbody_set_entries): Add prog and prog* to
autoload list.
* share/txr/stdlib/tagbody.tl (prog, prog*): New macros.
* txr.1: Documented.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/tagbody.tl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/txr/stdlib/tagbody.tl b/share/txr/stdlib/tagbody.tl index 7cfcd3f1..d3ca8a86 100644 --- a/share/txr/stdlib/tagbody.tl +++ b/share/txr/stdlib/tagbody.tl @@ -73,3 +73,12 @@ (if [[orf symbolp integerp chrp] label] (throwf 'eval-error "~s: no ~s label visible" 'go label) (throwf 'eval-error "~s: ~s isn't a symbol, integer or character" 'go label))) + + +(defmacro prog (vars . body) + ^(block nil + (let ,vars (tagbody ,*body)))) + +(defmacro prog* (vars . body) + ^(block nil + (let* ,vars (tagbody ,*body)))) |