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.
This commit is contained in:
Lars Ingebrigtsen 2021-11-13 10:05:36 +01:00
parent dafebe37eb
commit f32280bfa6

View file

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