diff options
| author | Gerd Moellmann | 2000-09-11 13:01:38 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-11 13:01:38 +0000 |
| commit | f74b07059d4bd017536a77a792b0575d6c2f1a1b (patch) | |
| tree | 5b7634e63c0bee072a725680888d8727118a047e /src | |
| parent | 7ee3bd7bf87ccceed644415da2d45f8a1e7b15f4 (diff) | |
| download | emacs-f74b07059d4bd017536a77a792b0575d6c2f1a1b.tar.gz emacs-f74b07059d4bd017536a77a792b0575d6c2f1a1b.zip | |
(init_lread): Set Vloads_in_progress to nil.
(Fload): Show list of recursively loaded files, when signaling an
error.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/lread.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c7fc236b495..96eb512983a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2000-09-11 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-09-11 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * lread.c (init_lread): Set Vloads_in_progress to nil. | ||
| 4 | (Fload): Show list of recursively loaded files, when signaling an | ||
| 5 | error. | ||
| 6 | |||
| 3 | * lread.c (Vloads_in_progress): New variable. | 7 | * lread.c (Vloads_in_progress): New variable. |
| 4 | (record_load_unwind): New function. | 8 | (record_load_unwind): New function. |
| 5 | (Fload): Check for recursive loads. | 9 | (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.") | |||
| 711 | /* Check if we're loading this file again while another load | 711 | /* Check if we're loading this file again while another load |
| 712 | of the same file is already in progress. */ | 712 | of the same file is already in progress. */ |
| 713 | if (!NILP (Fmember (found, Vloads_in_progress))) | 713 | if (!NILP (Fmember (found, Vloads_in_progress))) |
| 714 | error ("Recursive load of file `%s'", XSTRING (file)->data); | 714 | Fsignal (Qerror, Fcons (build_string ("Recursive load"), |
| 715 | Fcons (found, Vloads_in_progress))); | ||
| 715 | record_unwind_protect (record_load_unwind, Vloads_in_progress); | 716 | record_unwind_protect (record_load_unwind, Vloads_in_progress); |
| 716 | Vloads_in_progress = Fcons (found, Vloads_in_progress); | 717 | Vloads_in_progress = Fcons (found, Vloads_in_progress); |
| 717 | 718 | ||
| @@ -3428,6 +3429,7 @@ init_lread () | |||
| 3428 | load_descriptor_list = Qnil; | 3429 | load_descriptor_list = Qnil; |
| 3429 | 3430 | ||
| 3430 | Vstandard_input = Qt; | 3431 | Vstandard_input = Qt; |
| 3432 | Vloads_in_progress = Qnil; | ||
| 3431 | } | 3433 | } |
| 3432 | 3434 | ||
| 3433 | /* Print a warning, using format string FORMAT, that directory DIRNAME | 3435 | /* Print a warning, using format string FORMAT, that directory DIRNAME |