diff options
author | Gregory Heytings <gregory@heytings.org> | 2021-10-04 14:13:46 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-10-04 18:04:20 +0300 |
commit | 95a0227ff74e4863203a8c2050727e57f8172861 (patch) | |
tree | 9dadbeb347a0a4a6806b3edb62a647eaa52fe838 /src/print.c | |
parent | b7ae0232bed40fd643cfeffbf12110de9e8dbc15 (diff) | |
download | emacs-95a0227ff74e4863203a8c2050727e57f8172861.tar.gz |
Avoid exiting when outputting error messages during loadup
* src/print.c (print_error_message): Don't call
'substitute-command-keys' when it isn't fboundp.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index d4301fd7b64..9f684bbeb53 100644 --- a/src/print.c +++ b/src/print.c @@ -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); } |