From dac10e81b344483b61ac4086725909a85be67ad2 Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Sun, 3 Oct 2021 23:21:32 +0000 Subject: [PATCH] Do not use the Elisp version of substitute-command-keys in batch mode. src/print.c (print_error_message): Do not use the Elisp version of substitute-command-keys in batch mode. --- src/print.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/print.c b/src/print.c index d4301fd7b6..f83e5d9ece 100644 --- a/src/print.c +++ b/src/print.c @@ -941,7 +941,10 @@ 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)); + if (noninteractive) + errmsg = Fsubstitute_command_keys_old (Fget (errname, Qerror_message)); + else + errmsg = call1 (Qsubstitute_command_keys, Fget (errname, Qerror_message)); file_error = Fmemq (Qfile_error, error_conditions); } -- 2.33.0