From a37da91a092c460384bce2ab16341d4e6ec06a9b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 23 Jan 2022 15:08:34 +0100 Subject: [PATCH] Make apropos-print-doc more resilient * lisp/apropos.el (apropos-print-doc): Don't bug out on doc strings that have invalid command key syntaxes. --- lisp/apropos.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/apropos.el b/lisp/apropos.el index 6ff444f8680..f47e70ce5cb 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1276,7 +1276,9 @@ as a heading." (cond ((equal doc "") (setq doc "(not documented)")) (do-keys - (setq doc (substitute-command-keys doc)))) + (setq doc (or (ignore-errors + (substitute-command-keys doc)) + doc)))) (insert doc) (if (equal doc "(not documented)") (put-text-property opoint (point) 'font-lock-face 'shadow)) -- 2.39.5