From 5404973916dc5d0b92604d31ad7dca2358bc5b9a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 5 Dec 2021 02:57:43 +0100 Subject: [PATCH] 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). --- lisp/help.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- 2.39.5