summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-12-18 20:50:07 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-12-18 20:50:07 -0800
commitddb0330c904fac025a6f50219937b204c4c880c7 (patch)
treedd1096793bf0fa30fdb683523e1a9a7edb1a7d70 /lisplib.c
parentf0228c233a9b295c828dc4023f84b092eb8bee51 (diff)
downloadtxr-ddb0330c904fac025a6f50219937b204c4c880c7.tar.gz
txr-ddb0330c904fac025a6f50219937b204c4c880c7.tar.bz2
txr-ddb0330c904fac025a6f50219937b204c4c880c7.zip
New condlet macro; small change to iflet/whenlet.
* eval.c (me_iflet_whenlet): Allow the test form to be an atomic expression instead of bindings. This allows iflet to be used as the sole target construct of condlet, while allowing condlet to have a fallback clause with t. It also means that an empty list of bindings is allowed (since it is the atom nil). * lisplib.c (ifa_set_entries): Add "condlet" to the autoload names for the ifa module. That's where we are adding condlet. * share/txr/stdlib/ifa.tl (sys:if-to-cond): New macro expander helper function, generalizing the writing cond-like macros based on if-like operators. (conda): Rewritten using sys:if-to-cond. (condlet): New macro. * txr.1: Documented change in iflet/whenlet. Documented condlet.
Diffstat (limited to 'lisplib.c')
-rw-r--r--lisplib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisplib.c b/lisplib.c
index e06b62e6..fcaf05f1 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -102,7 +102,7 @@ static val ver_instantiate(val set_fun)
static val ifa_set_entries(val dlt, val fun)
{
- val name[] = { lit("ifa"), lit("conda"), nil };
+ val name[] = { lit("ifa"), lit("conda"), lit("condlet"), nil };
set_dlt_entries(dlt, name, fun);
return nil;
}