summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-19 17:17:23 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-19 17:17:23 -0800
commit4ac284ddd4bbf4c3c02c0531795baf669bca4f54 (patch)
treeb2f64edbcc4d174876763e1371ef655f18ba6b43 /match.c
parent1f3d894dab47e0d2527adf7db0b74296f19f7b81 (diff)
downloadtxr-4ac284ddd4bbf4c3c02c0531795baf669bca4f54.tar.gz
txr-4ac284ddd4bbf4c3c02c0531795baf669bca4f54.tar.bz2
txr-4ac284ddd4bbf4c3c02c0531795baf669bca4f54.zip
* match.c (v_deffilter): Even better. Just evaluate
the arguments individually. Now @(deffilter a b ..) is possible where these evaluate to suitable lists of strings. * txr.1: Documented.
Diffstat (limited to 'match.c')
-rw-r--r--match.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/match.c b/match.c
index 2b78cc8e..bb3da027 100644
--- a/match.c
+++ b/match.c
@@ -2899,18 +2899,8 @@ static val v_deffilter(match_files_ctx *c)
sem_error(specline, lit("deffilter: ~a is not a symbol"),
first(first_spec), nao);
- if (!all_satisfy(table, func_n1(listp), nil))
- sem_error(specline,
- lit("deffilter arguments must be lists"),
- nao);
-
{
- val table_evaled = mapcar(curry_12_2(func_n2(mapcar),
- chain(curry_123_2(func_n3(eval_form),
- specline, c->bindings),
- cdr_f,
- nao)),
- table);
+ val table_evaled = cdr(eval_form(specline, table, c->bindings));
if (!all_satisfy(table_evaled, andf(func_n1(listp),
chain(func_n1(length),