emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8ec8decd9f: Avoid native compiler setting user-init-file to warni


From: Juanma Barranquero
Subject: master 8ec8decd9f: Avoid native compiler setting user-init-file to warnings.el (bug#59358)
Date: Sun, 20 Nov 2022 15:41:44 -0500 (EST)

branch: master
commit 8ec8decd9f1ab642c7f1406b37a89773345b5aba
Author: Juanma Barranquero <lekktu@gmail.com>
Commit: Juanma Barranquero <lekktu@gmail.com>

    Avoid native compiler setting user-init-file to warnings.el (bug#59358)
    
    * 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 | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index c28324dc35..2a57f72194 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -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;
            }
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]