Make warning about require/autoload while bootstrapping not error out

* src/fns.c (Frequire):
* src/eval.c (Fautoload_do_load): Avoid further errors while
outputting the error about not being able to autoload/require
while bootstrapping.
This commit is contained in:
Lars Ingebrigtsen 2022-06-24 10:45:34 +02:00
parent bd1f20eea1
commit 2ff5cb4cb4
2 changed files with 14 additions and 4 deletions

View file

@ -2273,8 +2273,13 @@ it defines a macro. */)
/* This is to make sure that loadup.el gives a clear picture
of what files are preloaded and when. */
if (will_dump_p () && !will_bootstrap_p ())
error ("Attempt to autoload %s while preparing to dump",
SDATA (SYMBOL_NAME (funname)));
{
/* Avoid landing here recursively while outputting the
backtrace from the error. */
gflags.will_dump_ = false;
error ("Attempt to autoload %s while preparing to dump",
SDATA (SYMBOL_NAME (funname)));
}
CHECK_SYMBOL (funname);

View file

@ -3121,8 +3121,13 @@ FILENAME are suppressed. */)
/* This is to make sure that loadup.el gives a clear picture
of what files are preloaded and when. */
if (will_dump_p () && !will_bootstrap_p ())
error ("(require %s) while preparing to dump",
SDATA (SYMBOL_NAME (feature)));
{
/* Avoid landing here recursively while outputting the
backtrace from the error. */
gflags.will_dump_ = false;
error ("(require %s) while preparing to dump",
SDATA (SYMBOL_NAME (feature)));
}
/* A certain amount of recursive `require' is legitimate,
but if we require the same feature recursively 3 times,