summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-24 07:59:46 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-24 07:59:46 -0700
commitdfeadd4e8a8b1f1acdde2937ad4a210a9350b59e (patch)
treeb9f496bc17a073e4adb3b20054c8bd553612410c /eval.c
parent5deaba90dc0934e1b7b6ef026df77910c70560f1 (diff)
downloadtxr-dfeadd4e8a8b1f1acdde2937ad4a210a9350b59e.tar.gz
txr-dfeadd4e8a8b1f1acdde2937ad4a210a9350b59e.tar.bz2
txr-dfeadd4e8a8b1f1acdde2937ad4a210a9350b59e.zip
Compatibility <= 107 allows redefinition of builtins.
* eval.c (builtin_reject_test): Suppress the diagnostic against redefinition of built-in macros and operators if the compatibility is 107 or lower. The rejection appeared in 108. * txr.1: Document this compatibility behavior.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 3800c6ca..c792e99e 100644
--- a/eval.c
+++ b/eval.c
@@ -1469,6 +1469,8 @@ static void builtin_reject_test(val op, val sym, val form)
if (!bindable(sym)) {
eval_error(form, lit("~s: cannot bind ~s, which is not a bindable symbol"),
is_operator, sym, nao);
+ } else if (opt_compat && opt_compat <= 107) {
+ /* empty */
} else if (builtin_kind) {
eval_error(form, lit("~s: cannot bind ~s, which is a built-in ~s"),
op, sym, builtin_kind, nao);