From: Lars Ingebrigtsen Date: Sat, 13 Nov 2021 09:05:36 +0000 (+0100) Subject: Don't create links to undefined commands in help--describe-command X-Git-Tag: emacs-29.0.90~2852^2~312 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f32280bfa6342090abaa9f015d4cd70fb81bbfef;p=emacs.git Don't create links to undefined commands in help--describe-command * lisp/help.el (help--describe-command): Don't create links to commands that aren't defined. --- diff --git a/lisp/help.el b/lisp/help.el index b2772f4389b..4470e6baaa4 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1328,9 +1328,11 @@ Return nil if the key sequence is too long." (defun help--describe-command (definition &optional translation) (cond ((symbolp definition) - (insert-text-button (symbol-name definition) - 'type 'help-function - 'help-args (list definition)) + (if (fboundp definition) + (insert-text-button (symbol-name definition) + 'type 'help-function + 'help-args (list definition)) + (insert (symbol-name definition))) (insert "\n")) ((or (stringp definition) (vectorp definition)) (if translation