Commit f74b0705 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(init_lread): Set Vloads_in_progress to nil.

(Fload): Show list of recursively loaded files, when signaling an
error.
parent 7ee3bd7b
2000-09-11 Gerd Moellmann <gerd@gnu.org> 2000-09-11 Gerd Moellmann <gerd@gnu.org>
* 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. * lread.c (Vloads_in_progress): New variable.
(record_load_unwind): New function. (record_load_unwind): New function.
(Fload): Check for recursive loads. (Fload): Check for recursive loads.
......
...@@ -711,7 +711,8 @@ Return t if file exists.") ...@@ -711,7 +711,8 @@ Return t if file exists.")
/* Check if we're loading this file again while another load /* Check if we're loading this file again while another load
of the same file is already in progress. */ of the same file is already in progress. */
if (!NILP (Fmember (found, Vloads_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); record_unwind_protect (record_load_unwind, Vloads_in_progress);
Vloads_in_progress = Fcons (found, Vloads_in_progress); Vloads_in_progress = Fcons (found, Vloads_in_progress);
...@@ -3428,6 +3429,7 @@ init_lread () ...@@ -3428,6 +3429,7 @@ init_lread ()
load_descriptor_list = Qnil; load_descriptor_list = Qnil;
Vstandard_input = Qt; Vstandard_input = Qt;
Vloads_in_progress = Qnil;
} }
/* Print a warning, using format string FORMAT, that directory DIRNAME /* Print a warning, using format string FORMAT, that directory DIRNAME
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment