From 77a208a0bf026fe31b111c2bb43f744a5bacdbf4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 22 Jan 2017 10:02:26 -0800 Subject: 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. --- match.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/match.c b/match.c index 6ad9ac6a..a97a2b65 100644 --- a/match.c +++ b/match.c @@ -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; -- cgit v1.2.3