Commit 5e3e14f6 authored by Paul Eggert's avatar Paul Eggert
Browse files

Minor lread.c tweaks

* src/lread.c (load_warn_unescaped_character_literals):
Use AUTO_STRING to help the GC.
(Fload): Use bool for boolean.
parent a33308a2
Pipeline #1358 failed with stage
in 54 minutes and 19 seconds
...@@ -1034,12 +1034,12 @@ load_error_old_style_backquotes (void) ...@@ -1034,12 +1034,12 @@ load_error_old_style_backquotes (void)
static void static void
load_warn_unescaped_character_literals (Lisp_Object file) load_warn_unescaped_character_literals (Lisp_Object file)
{ {
Lisp_Object warning Lisp_Object warning = call0 (Qbyte_run_unescaped_character_literals_warning);
= call0 (Qbyte_run_unescaped_character_literals_warning); if (!NILP (warning))
if (NILP (warning)) {
return; AUTO_STRING (format, "Loading `%s': %s");
Lisp_Object format = build_string ("Loading `%s': %s"); CALLN (Fmessage, format, file, warning);
CALLN (Fmessage, format, file, warning); }
} }
DEFUN ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0, DEFUN ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0,
...@@ -1301,8 +1301,8 @@ Return t if the file exists and loads successfully. */) ...@@ -1301,8 +1301,8 @@ Return t if the file exists and loads successfully. */)
specbind (Qlread_unescaped_character_literals, Qnil); specbind (Qlread_unescaped_character_literals, Qnil);
record_unwind_protect (load_warn_unescaped_character_literals, file); record_unwind_protect (load_warn_unescaped_character_literals, file);
int is_elc; bool is_elc = suffix_p (found, ".elc");
if ((is_elc = suffix_p (found, ".elc")) != 0 if (is_elc
/* version = 1 means the file is empty, in which case we can /* version = 1 means the file is empty, in which case we can
treat it as not byte-compiled. */ treat it as not byte-compiled. */
|| (fd >= 0 && (version = safe_to_load_version (fd)) > 1)) || (fd >= 0 && (version = safe_to_load_version (fd)) > 1))
......
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