]> git.eshelyaron.com Git - emacs.git/commitdiff
Make help--describe-command more robust
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 5 Dec 2021 01:57:43 +0000 (02:57 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 5 Dec 2021 01:58:06 +0000 (02:58 +0100)
* lisp/help.el (help--describe-command): `help-function' buttons
are defined in help-mode.el, so it might not exist yet when
calling `documentation' directly (bug#52291).

lisp/help.el

index adb2bd87a940a28cd594ec20fc77282d6e7b8a1b..eb0a78222726e4bbac6de7b5aaf00315e8ab6d72 100644 (file)
@@ -1353,7 +1353,8 @@ Return nil if the key sequence is too long."
 
 (defun help--describe-command (definition &optional translation)
   (cond ((symbolp definition)
-         (if (fboundp definition)
+         (if (and (fboundp definition)
+                  help-buffer-under-preparation)
              (insert-text-button (symbol-name definition)
                                  'type 'help-function
                                  'help-args (list definition))