summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-06 06:49:23 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-06 06:49:23 -0700
commit8a9159263d4ca1b174a60476e3863c45d9e63cc1 (patch)
tree102511afd760aaf388c753a10f273a5a64bfd829 /lisplib.c
parent668b7ab58822dd14ac54061373a09a1311748acf (diff)
downloadtxr-8a9159263d4ca1b174a60476e3863c45d9e63cc1.tar.gz
txr-8a9159263d4ca1b174a60476e3863c45d9e63cc1.tar.bz2
txr-8a9159263d4ca1b174a60476e3863c45d9e63cc1.zip
stdlib: all code read under sys package.
Another part of the preparation for an upcoming change. All library code is now read in the sys package, so any symbols that are interned (local variables and whatnot) are in sys and will not be exposed to user code. We have to overcome some annoyances to achieve this: - We have to stay away from the symbols exp or var, because they are now sys:exp and sys:var with their special meaning. - Instances in which a symbol of the same name exists in both sys and usr present a problem; the plain symbol now is the usr one. For instance rplaca will refer to sys:rplaca, so a small amount of code has to explicitly use usr:rplaca. * Makefile (COMPILE_TL): Change to the sys package before compiling library code. * lisplib.c (lisplib_try_load): Bind *package* to the system package. * share/txr/stdlib/asm.tl, share/txr/stdlib/compiler.tl: Remove in-package macro invocation; we don't need this since all files are loaded or compiled in the sys package. * share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl, share/txr/stdlib/conv.tl, share/txr/stdlib/doloop.tl, share/txr/stdlib/error.tl, share/txr/stdlib/error.tl, share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl, share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl, share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl, share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl, share/txr/stdlib/package.tl, share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl, share/txr/stdlib/pmac.tl, share/txr/stdlib/socket.tl, share/txr/stdlib/stream-wrap.tl, share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl, share/txr/stdlib/termios.tl, share/txr/stdlib/trace.tl share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl, share/txr/stdlib/ver.tl, share/txr/stdlib/with-resources.tl, share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl: Deal with the various usr versus sys symbol issues.
Diffstat (limited to 'lisplib.c')
-rw-r--r--lisplib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisplib.c b/lisplib.c
index d50b6899..1b93b19a 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -763,7 +763,7 @@ val lisplib_try_load(val sym)
debug_state_t ds = debug_set_state(opt_dbg_autoload ? 0 : -1, opt_dbg_autoload);
val saved_dyn_env = dyn_env;
dyn_env = make_env(nil, nil, dyn_env);
- env_vbind(dyn_env, package_s, user_package);
+ env_vbind(dyn_env, package_s, system_package);
env_vbind(dyn_env, package_alist_s, packages);
funcall(fun);
dyn_env = saved_dyn_env;