summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eldoc.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2023-03-24 14:34:05 +0000
committerJoão Távora <joaotavora@gmail.com>2023-03-24 15:08:50 +0000
commit541eec259be19464f855f852f99df4f995a380cc (patch)
tree8932df35d19c3856ef14061730c8e03ae46d3881 /lisp/emacs-lisp/eldoc.el
parent4566a0c6b825a18e6c065da0543b8b942b7db8df (diff)
downloademacs-541eec259be19464f855f852f99df4f995a380cc.tar.gz
Eldoc: fix bug recently introduced in "old" protocol
In the "old" protocol, eldoc-documentation-strategy is actually used as the deprecated eldoc-documentation-function and it is itself the "origin" of the doc snippet to be displayed. * lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Fix.
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r--lisp/emacs-lisp/eldoc.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 2108e189fbd..05033f39cba 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -911,8 +911,11 @@ the docstrings eventually produced, using
(let* ((eldoc--make-callback #'make-callback)
(res (funcall eldoc-documentation-strategy)))
;; Observe the old and the new protocol:
- (cond (;; Old protocol: got string, output immediately;
- (stringp res) (register-doc 0 res nil) (display-doc))
+ (cond (;; Old protocol: got string, e-d-strategy is iself the
+ ;; origin function, and we output immediately;
+ (stringp res)
+ (register-doc 0 res nil eldoc-documentation-strategy)
+ (display-doc))
(;; Old protocol: got nil, clear the echo area;
(null res) (eldoc--message nil))
(;; New protocol: trust callback will be called;