diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-05-20 10:38:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-05-20 10:38:13 -0700 |
commit | e25bbb34fc0b4ed7efb49b3059c902db960372c7 (patch) | |
tree | 77c37325e1c15790e0b74527399fdf4e701424ad /eval.c | |
parent | 0d3a7519e81dc9eb26d550393bb5d988dad645bf (diff) | |
download | txr-e25bbb34fc0b4ed7efb49b3059c902db960372c7.tar.gz txr-e25bbb34fc0b4ed7efb49b3059c902db960372c7.tar.bz2 txr-e25bbb34fc0b4ed7efb49b3059c902db960372c7.zip |
load: always bind *load-path* to actual path.
* eval.c (load): Bind *load-path* to the real path that was
used to open the file, not to the tentative path to which
the .tl suffix was added, subject to compatibility option.
* txr.1: Documentation for load revised for better wording and
to document the above change. Fixed *load-path* being wrongly
called a macro, and also load being called a macro.
Compat note added.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4342,7 +4342,9 @@ val load(val target) uw_simple_catch_begin; dyn_env = make_env(nil, nil, dyn_env); - env_vbind(dyn_env, load_path_s, path); + env_vbind(dyn_env, load_path_s, if3(opt_compat && opt_compat <= 215, + path, + stream_get_prop(stream, name_k))); env_vbind(dyn_env, load_recursive_s, t); env_vbind(dyn_env, package_s, cur_package); |