]> git.eshelyaron.com Git - emacs.git/commitdiff
Make apropos-print-doc more resilient
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 23 Jan 2022 14:08:34 +0000 (15:08 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 23 Jan 2022 14:08:34 +0000 (15:08 +0100)
* lisp/apropos.el (apropos-print-doc): Don't bug out on doc
strings that have invalid command key syntaxes.

lisp/apropos.el

index 6ff444f8680060bb13a2b1babde4abdc8c31a25b..f47e70ce5cb6c3c78225d5a0412f43a764256ddb 100644 (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))