emacs-diffs
[Top][All Lists]
Advanced

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

master 1428962: Fix problem with outputting error messages while dumping


From: Lars Ingebrigtsen
Subject: master 1428962: Fix problem with outputting error messages while dumping Emacs
Date: Mon, 4 Oct 2021 05:18:18 -0400 (EDT)

branch: master
commit 1428962590e216163f079ff838f39667383aec56
Author: Gregory Heytings <gregory@heytings.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix problem with outputting error messages while dumping Emacs
    
    * src/print.c (print_error_message): Don't call
    substitute-command-keys while bootstrapping.
---
 src/print.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/print.c b/src/print.c
index d4301fd..7f0bc3f 100644
--- a/src/print.c
+++ b/src/print.c
@@ -941,7 +941,13 @@ print_error_message (Lisp_Object data, Lisp_Object stream, 
const char *context,
   else
     {
       Lisp_Object error_conditions = Fget (errname, Qerror_conditions);
-      errmsg = call1 (Qsubstitute_command_keys, Fget (errname, 
Qerror_message));
+      /* Calling `substitute-command-keys' while bootstrapping will make
+        Emacs exit, so don't do that.  */
+      if (will_bootstrap_p () || will_dump_p ())
+       errmsg = Fget (errname, Qerror_message);
+      else
+       errmsg = call1 (Qsubstitute_command_keys,
+                       Fget (errname, Qerror_message));
       file_error = Fmemq (Qfile_error, error_conditions);
     }
 



reply via email to

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