From 979a9e38899271c647de29c506b04e753380cb2e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 17 Jan 2022 07:02:58 -0800 Subject: New function: match-fboundp. User vapnik spaknik was asking in the mailing list whether there is an existence test for TXR pattern functions. Now there is. * eval.c (eval_init): Register match-fboundp intrinsic. * match.c (match_fbound): New function. * match.h (match_fbound): Declared. * tests/011/txr-case.txr: New test cases. * txr.1: Documented. * stdlib/doc-syms.tl: Updated. --- match.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'match.c') diff --git a/match.c b/match.c index e07ab1c1..e2d01b80 100644 --- a/match.c +++ b/match.c @@ -5032,6 +5032,11 @@ val match_fun(val name, val args, val input_in, val files_in) return cons(c.bindings, if3(c.data, cons(c.data, c.data_lineno), t)); } +val match_fboundp(val name) +{ + return tnil(uw_get_func(name)); +} + val include(val specline) { val spec = cons(specline, nil); -- cgit v1.2.3