summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-09 06:37:02 -0800
committerKaz Kylheku <kaz@kylheku.com>2018-03-09 06:37:02 -0800
commitc0a8bb04f432749e018c5bd27479590bd97b6167 (patch)
treefa21ce7d2a820236b50c7e0356de7a9e52d3640b
parent0d388b568469daa0cd88ebbf73eb2e6d9c3d9382 (diff)
downloadtxr-c0a8bb04f432749e018c5bd27479590bd97b6167.tar.gz
txr-c0a8bb04f432749e018c5bd27479590bd97b6167.tar.bz2
txr-c0a8bb04f432749e018c5bd27479590bd97b6167.zip
sys package fall back on usr.
* lib.c (obj_init): Give the system package a fallback list consisting of one element: the user package. This will make it easier to develop some library features that have lots of internal symbols that ought to be hidden in the system package, without having to put sys: on everything. That code will just switch to the system package.
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 881df208..9d312007 100644
--- a/lib.c
+++ b/lib.c
@@ -10498,6 +10498,8 @@ static void obj_init(void)
lit("t"), nulloc), make_sym(lit("t"))));
set(mkloc(t->s.package, t), user_package);
+ set_package_fallback_list(system_package, cons(user_package, nil));
+
null_s = intern(lit("null"), user_package);
cons_s = intern(lit("cons"), user_package);
str_s = intern(lit("str"), user_package);