diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-05 13:22:33 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-05 13:22:42 +0200 |
commit | 8364f058b821eba31f84dcded175cca403a965a5 (patch) | |
tree | 4b299f00d92e2b465dc03c668c85228cf6899c57 | |
parent | be374c18b3305ebfe38936bc5d66a78d5cb31318 (diff) | |
download | emacs-8364f058b821eba31f84dcded175cca403a965a5.tar.gz emacs-8364f058b821eba31f84dcded175cca403a965a5.tar.bz2 emacs-8364f058b821eba31f84dcded175cca403a965a5.zip |
Be more resilient towards errors during error handling
* src/print.c (print_error_message): Avoid infinite recursion if
`substitute-command-keys' bugs out (bug#55269).
-rw-r--r-- | src/print.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index 54d8bdfa3d8..d7583282b69 100644 --- a/src/print.c +++ b/src/print.c @@ -954,7 +954,14 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context, 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); + { + /* `substitute-command-keys' may bug out, which would lead + to infinite recursion when we're called from + skip_debugger, so ignore errors. */ + Lisp_Object subs = safe_call1 (Qsubstitute_command_keys, errmsg); + if (!NILP (subs)) + errmsg = subs; + } file_error = Fmemq (Qfile_error, error_conditions); } |