* 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).
(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))