]> git.eshelyaron.com Git - emacs.git/commitdiff
Eldoc: fix bug recently introduced in "old" protocol
authorJoão Távora <joaotavora@gmail.com>
Fri, 24 Mar 2023 14:34:05 +0000 (14:34 +0000)
committerJoão Távora <joaotavora@gmail.com>
Fri, 24 Mar 2023 15:08:50 +0000 (15:08 +0000)
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.

lisp/emacs-lisp/eldoc.el

index 2108e189fbdd2796bd2f40073adb43dd30b3872a..05033f39cba09bf6b1932720954f14c759382d2f 100644 (file)
@@ -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;