summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-02-20 13:16:35 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2022-02-20 13:16:35 -0500
commit48c65f219dcf2c9004fe995c79a132935b7d183a (patch)
treea936fd9115d6fa9f8567bc70f3aa57121c06cefb /src/lread.c
parente6f541f2383cf860c6a2d6c8d366c21a3b8de2d0 (diff)
downloademacs-48c65f219dcf2c9004fe995c79a132935b7d183a.tar.gz
(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`.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c5
1 files changed, 4 insertions, 1 deletions
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