]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid exiting when outputting error messages during loadup
authorGregory Heytings <gregory@heytings.org>
Mon, 4 Oct 2021 14:13:46 +0000 (14:13 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 4 Oct 2021 15:04:20 +0000 (18:04 +0300)
* src/print.c (print_error_message): Don't call
'substitute-command-keys' when it isn't fboundp.

src/print.c

index d4301fd7b6423539ea2ae768a82a03487d6e97e6..9f684bbeb538c628a3671e120cf318726eab72c8 100644 (file)
@@ -941,7 +941,11 @@ 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));
+      errmsg = Fget (errname, Qerror_message);
+      /* During loadup 'substitute-command-keys' might not be available.  */
+      if (!NILP (Ffboundp (Qsubstitute_command_keys)))
+       errmsg = call1 (Qsubstitute_command_keys, errmsg);
+
       file_error = Fmemq (Qfile_error, error_conditions);
     }