emacs-31 8e5c0386f18: Improve eldoc-help-at-pt docstrings

Eli Zaretskii <[email protected]> Thu, 9 Jul 2026 11:50:28 -0400 (EDT)
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit 8e5c0386f18956d70bc7eff69fa842de8bda5f08
Author: Daniel Mendler <[email protected]>
Commit: Eli Zaretskii <[email protected]>

    Improve eldoc-help-at-pt docstrings
    
    * lisp/emacs-lisp/eldoc.el (eldoc-help-at-pt, eldoc-show-help-at-pt):
    Improve docstrings.  (Bug#81356)
---
 lisp/emacs-lisp/eldoc.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 963a7d2ea4d..7b12024cba6 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -140,9 +140,9 @@ is only skipped if the documentation needs to be truncated there."
 
 (defcustom eldoc-help-at-pt nil
   "If non-nil, show `help-at-pt-kbd-string' at point via Eldoc.
-This setting is an alternative to `help-at-pt-display-when-idle'.  If
-the value is non-nil, `eldoc-show-help-at-pt' will show help-at-point
-via Eldoc."
+This setting is an alternative to `help-at-pt-display-when-idle'.  In
+order to enable help at point only in certain buffers add
+`eldoc-show-help-at-pt' locally to `eldoc-documentation-functions'."
   :type 'boolean
   :set (lambda (sym val)
          (custom-set-default sym val)
@@ -980,8 +980,10 @@ the docstrings eventually produced, using
              (eldoc--invoke-strategy nil))))))
 
 (defun eldoc-show-help-at-pt (&rest _)
-  "Show help at point via Eldoc if `eldoc-help-at-pt' is non-nil.
-Intended for `eldoc-documentation-functions' (which see)."
+  "Show help at point via Eldoc taken from `help-at-pt-kbd-string'.
+This function is intended to be added buffer-locally by major modes to
+`eldoc-documentation-functions'.  In order to enable help at point
+globally, users can set `eldoc-help-at-pt' to t."
   (when-let* ((help (help-at-pt-kbd-string)))
     (format "Help: %s" (substitute-command-keys help))))