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.
This commit is contained in:
Lars Ingebrigtsen 2022-01-23 15:08:34 +01:00
parent 3b0d848b54
commit a37da91a09

View file

@ -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))