]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid native compiler setting user-init-file to warnings.el (bug#59358)
authorJuanma Barranquero <lekktu@gmail.com>
Sun, 20 Nov 2022 20:40:08 +0000 (21:40 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Sun, 20 Nov 2022 20:40:08 +0000 (21:40 +0100)
* src/lread.c (maybe_swap_for_eln): Use a delayed warning
instead of `display-warning' to avoid a recursive call to
Fload while loading the init file that sets `user-init-file'
to a bogus value.

src/lread.c

index c28324dc35b386c73bd931881d2155e4c9bc80a5..2a57f72194334b6fdc264d86f4d33c82ca467b49 100644 (file)
@@ -1741,12 +1741,15 @@ maybe_swap_for_eln (bool no_native, Lisp_Object *filename, int *fd,
                                               Vload_path,
                                               Qnil, Qnil)))
                return;
-             call2 (intern_c_string ("display-warning"),
-                    Qcomp,
-                    CALLN (Fformat,
-                           build_string ("Cannot look up eln file as "
-                                         "no source file was found for %s"),
-                           *filename));
+             Vdelayed_warnings_list
+               = Fcons (list2
+                        (Qcomp,
+                         CALLN (Fformat,
+                                build_string ("Cannot look up eln "
+                                              "file as no source file "
+                                              "was found for %s"),
+                                *filename)),
+                        Vdelayed_warnings_list);
              return;
            }
        }