summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-06-20 06:35:43 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-06-20 06:35:43 -0700
commit9a19796dfbfcce1aa425e0bcd47881b8a3089423 (patch)
tree8e6d12db35e1655ee0f594f5116cd4336a057a97 /eval.c
parent4bedd6056cc59f7194ae4eede97b4c460275fcc8 (diff)
downloadtxr-9a19796dfbfcce1aa425e0bcd47881b8a3089423.tar.gz
txr-9a19796dfbfcce1aa425e0bcd47881b8a3089423.tar.bz2
txr-9a19796dfbfcce1aa425e0bcd47881b8a3089423.zip
* eval.c (eval_init): Register have function, synonym of true.
* txr.1: Document have.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 41b33865..7d1ef1ae 100644
--- a/eval.c
+++ b/eval.c
@@ -3865,6 +3865,8 @@ static val merge_wrap(val seq1, val seq2, val lessfun, val keyfun)
void eval_init(void)
{
+ val not_null_f = func_n1(not_null);
+
protect(&top_vb, &top_fb, &top_mb, &top_smb, &special, &builtin, &dyn_env,
&op_table, &last_form_evaled, &last_form_expanded,
&call_f, convert(val *, 0));
@@ -4084,7 +4086,8 @@ void eval_init(void)
reg_fun(intern(lit("atom"), user_package), func_n1(atom));
reg_fun(intern(lit("null"), user_package), null_f);
reg_fun(intern(lit("false"), user_package), null_f);
- reg_fun(intern(lit("true"), user_package), func_n1(not_null));
+ reg_fun(intern(lit("true"), user_package), not_null_f);
+ reg_fun(intern(lit("have"), user_package), not_null_f);
reg_fun(not_s, null_f);
reg_fun(intern(lit("consp"), user_package), func_n1(consp));
reg_fun(intern(lit("lconsp"), user_package), func_n1(lconsp));