]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't create links to undefined commands in help--describe-command
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Nov 2021 09:05:36 +0000 (10:05 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Nov 2021 09:05:44 +0000 (10:05 +0100)
* lisp/help.el (help--describe-command): Don't create links to
commands that aren't defined.

lisp/help.el

index b2772f4389b1d763d977ec6d94b37b57a6e49dbf..4470e6baaa47959158868134130c124e6563cd29 100644 (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