]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a bootstrap issue with unescaped character literal detection.
authorPhilipp Stephani <phst@google.com>
Sun, 12 Apr 2020 09:58:36 +0000 (11:58 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 12 Apr 2020 09:58:36 +0000 (11:58 +0200)
* src/lread.c (load_warn_unescaped_character_literals): Deal with the
case that 'byte-run--unescaped-character-literals-warning' isn't yet
defined.

src/lread.c

index eabf3b938c2287ec77e0c7f8ee2dbdcb2c82dea7..8ec9e3250491a857339251f941dac6b01ef410e3 100644 (file)
@@ -1030,7 +1030,13 @@ load_error_handler (Lisp_Object data)
 static void
 load_warn_unescaped_character_literals (Lisp_Object file)
 {
-  Lisp_Object warning = call0 (Qbyte_run_unescaped_character_literals_warning);
+  Lisp_Object function
+    = Fsymbol_function (Qbyte_run_unescaped_character_literals_warning);
+  /* If byte-run.el is being loaded,
+     `byte-run--unescaped-character-literals-warning' isn't yet
+     defined.  Since it'll be byte-compiled later, ignore potential
+     unescaped character literals. */
+  Lisp_Object warning = NILP (function) ? Qnil : call0 (function);
   if (!NILP (warning))
     {
       AUTO_STRING (format, "Loading `%s': %s");