From f74b07059d4bd017536a77a792b0575d6c2f1a1b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 11 Sep 2000 13:01:38 +0000 Subject: [PATCH] (init_lread): Set Vloads_in_progress to nil. (Fload): Show list of recursively loaded files, when signaling an error. --- src/ChangeLog | 4 ++++ src/lread.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c7fc236b495..96eb512983a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2000-09-11 Gerd Moellmann + * lread.c (init_lread): Set Vloads_in_progress to nil. + (Fload): Show list of recursively loaded files, when signaling an + error. + * lread.c (Vloads_in_progress): New variable. (record_load_unwind): New function. (Fload): Check for recursive loads. diff --git a/src/lread.c b/src/lread.c index 0788eb85068..3a0acdd104f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -711,7 +711,8 @@ Return t if file exists.") /* Check if we're loading this file again while another load of the same file is already in progress. */ if (!NILP (Fmember (found, Vloads_in_progress))) - error ("Recursive load of file `%s'", XSTRING (file)->data); + Fsignal (Qerror, Fcons (build_string ("Recursive load"), + Fcons (found, Vloads_in_progress))); record_unwind_protect (record_load_unwind, Vloads_in_progress); Vloads_in_progress = Fcons (found, Vloads_in_progress); @@ -3428,6 +3429,7 @@ init_lread () load_descriptor_list = Qnil; Vstandard_input = Qt; + Vloads_in_progress = Qnil; } /* Print a warning, using format string FORMAT, that directory DIRNAME -- 2.39.5