summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisplib.c7
-rw-r--r--share/txr/stdlib/compiler.tl7
-rw-r--r--share/txr/stdlib/error.tl7
3 files changed, 13 insertions, 8 deletions
diff --git a/lisplib.c b/lisplib.c
index c40cf3a2..aee8f6aa 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -532,10 +532,15 @@ static val pmac_instantiate(val set_fun)
static val error_set_entries(val dlt, val fun)
{
+ val sys_name[] = {
+ lit("bind-mac-error"),
+ nil
+ };
val name[] = {
lit("compile-error"), lit("compile-warning"), lit("compile-defr-warning"),
nil
};
+ set_dlt_entries_sys(dlt, sys_name, fun);
set_dlt_entries(dlt, name, fun);
return nil;
}
@@ -658,7 +663,7 @@ static val compiler_instantiate(val set_fun)
static val compiler_set_entries(val dlt, val fun)
{
val sys_name[] = {
- lit("compiler"), lit("bind-mac-error"),
+ lit("compiler"),
nil
};
val name[] = {
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index e56287c7..b0942a15 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -1294,13 +1294,6 @@
(mac-param-bind form (op name def) form
^(sys:rt-defsymacro ',name ',def)))
-(defun sys:bind-mac-error (ctx-form params obj too-few-p)
- (if (atom obj)
- (compile-error ctx-form "extra atom ~s not matched by params ~s"
- obj params)
- (compile-error ctx-form "object ~s too ~a for params ~s"
- obj (if too-few-p "short" "long") params)))
-
(defun usr:compile-toplevel (exp)
(let ((co (new compiler))
(as (new assembler)))
diff --git a/share/txr/stdlib/error.tl b/share/txr/stdlib/error.tl
index 8376535a..1e9ec191 100644
--- a/share/txr/stdlib/error.tl
+++ b/share/txr/stdlib/error.tl
@@ -47,3 +47,10 @@
(catch
(throw 'defr-warning (fmt `@loc~s: @fmt` name . args) tag)
(continue ()))))
+
+(defun sys:bind-mac-error (ctx-form params obj too-few-p)
+ (if (atom obj)
+ (compile-error ctx-form "extra atom ~s not matched by params ~s"
+ obj params)
+ (compile-error ctx-form "object ~s too ~a for params ~s"
+ obj (if too-few-p "short" "long") params)))