Make help--describe-command more robust

* 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).
This commit is contained in:
Lars Ingebrigtsen 2021-12-05 02:57:43 +01:00
parent d3b4f838b9
commit 5404973916

View 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))