summaryrefslogtreecommitdiffstats
path: root/eval.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-26 20:04:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-26 20:04:48 -0700
commit35c93525878412abba9acbc46071327c8bfcfc9c (patch)
treea7445b4a0bf67b203d0fbc32d5d55a159b020395 /eval.h
parent36f8481e4029ce04776e222653ab3e5aff0c9cd7 (diff)
downloadtxr-35c93525878412abba9acbc46071327c8bfcfc9c.tar.gz
txr-35c93525878412abba9acbc46071327c8bfcfc9c.tar.bz2
txr-35c93525878412abba9acbc46071327c8bfcfc9c.zip
Overhaul of self-load-path mechanism.
The self-load-path symbol macro is as of now deprecated. It simply expands to *load-path*. *load-path* is a new special variable which is dynamically bound to the path of a file being loaded. * eval.c (self_load_path_s): Global variable renamed to load_path_s. (sys_load): Bind *load-path* around processing of loaded file. (me_load): Expand (load x) simply to (sys:load x *load-path*). (set_get_symacro): Function removed. (reg_symacro): New static function. (eval_init): Initialize renamed load_path_s with interned symbol having the name *load-path*. Register the *load-path* special variable. Set up the sel-load-path symbol macro aliasing for *load-path*. * eval.h (self_load_path_s): Declaration renamed. * match.c (v_load): Bind *load-path* around loading or inclusion. * parser.c (load_rcfile): Bind *load-path* around loading of .txr_profile file. * txr.c (txr_main): Bind *load-path* instead of self-load-path symbol macro. * txr.1: Updated documentation for @(load) directive and load macro. Replaced documentation of self-load-path with *load-path*.
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.h b/eval.h
index fb9c34f4..d36290fb 100644
--- a/eval.h
+++ b/eval.h
@@ -30,7 +30,7 @@ extern val eval_error_s, if_s, call_s;
extern val eq_s, eql_s, equal_s;
extern val car_s, cdr_s;
extern val last_form_evaled, last_form_expanded;
-extern val self_load_path_s;
+extern val load_path_s;
noreturn val eval_error(val ctx, val fmt, ...);
val ctx_form(val obj);