From f32280bfa6342090abaa9f015d4cd70fb81bbfef Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 13 Nov 2021 10:05:36 +0100 Subject: [PATCH] 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. --- lisp/help.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.2