From: Lars Ingebrigtsen Date: Sun, 5 Dec 2021 01:57:43 +0000 (+0100) Subject: Make help--describe-command more robust X-Git-Tag: emacs-29.0.90~3617^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5404973916dc5d0b92604d31ad7dca2358bc5b9a;p=emacs.git 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). --- diff --git a/lisp/help.el b/lisp/help.el index adb2bd87a94..eb0a7822272 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -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))