From: Stefan Monnier Date: Sun, 20 Feb 2022 18:16:35 +0000 (-0500) Subject: (loadhist_initialize): Fix regression test failure X-Git-Tag: emacs-29.0.90~2195 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48c65f219dcf2c9004fe995c79a132935b7d183a;p=emacs.git (loadhist_initialize): Fix regression test failure * src/lread.c (loadhist_initialize): Adjust assertion for the nil case. (readevalloop): Signal an error for non-string `sourcename`. --- diff --git a/src/lread.c b/src/lread.c index d225403b203..0486a98883c 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1172,7 +1172,7 @@ compute_found_effective (Lisp_Object found) static void loadhist_initialize (Lisp_Object filename) { - eassert (STRINGP (filename)); + eassert (STRINGP (filename) || NILP (filename)); specbind (Qcurrent_load_list, Fcons (filename, Qnil)); } @@ -2179,6 +2179,9 @@ readevalloop (Lisp_Object readcharfun, bool first_sexp = 1; Lisp_Object macroexpand = intern ("internal-macroexpand-for-load"); + if (!NILP (sourcename)) + CHECK_STRING (sourcename); + if (NILP (Ffboundp (macroexpand)) || (STRINGP (sourcename) && suffix_p (sourcename, ".elc"))) /* Don't macroexpand before the corresponding function is defined