diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-01-22 10:02:26 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-01-22 10:02:26 -0800 |
commit | c2906d9e4e686a7ee34bc47200d391ca88307755 (patch) | |
tree | 0cff499ca7bd8047672603df06311bce001f36a6 | |
parent | c9838a34a60b15bab4c702f66ebfc17b15a03ba2 (diff) | |
download | txr-c2906d9e4e686a7ee34bc47200d391ca88307755.tar.gz txr-c2906d9e4e686a7ee34bc47200d391ca88307755.tar.bz2 txr-c2906d9e4e686a7ee34bc47200d391ca88307755.zip |
Dump deferred warnings in @(load).
* match.c (v_load): Bind *load-recursive* to t around
the loading, and dump deferred warnings afterward if
the previous value of *load-recursive* is nil.
-rw-r--r-- | match.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3986,6 +3986,7 @@ static val v_load(match_files_ctx *c) val txr_lisp_p = nil; val ret = nil; val saved_dyn_env = dyn_env; + val rec = cdr(lookup_var(saved_dyn_env, load_recursive_s)); open_txr_file(path, &txr_lisp_p, &name, &stream); @@ -3993,6 +3994,7 @@ static val v_load(match_files_ctx *c) dyn_env = make_env(nil, nil, dyn_env); env_vbind(dyn_env, load_path_s, name); + env_vbind(dyn_env, load_recursive_s, t); if (!txr_lisp_p) { int gc = gc_state(0); @@ -4046,6 +4048,8 @@ static val v_load(match_files_ctx *c) uw_unwind { close_stream(stream, nil); + if (!rec) + uw_dump_deferred_warnings(std_null); } uw_catch_end; |