[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ae6daa6: Fix ElDoc's eldoc-documentation-enthusiast strategy
From: |
Jo�o T�vora |
Subject: |
master ae6daa6: Fix ElDoc's eldoc-documentation-enthusiast strategy |
Date: |
Thu, 3 Sep 2020 18:24:25 -0400 (EDT) |
branch: master
commit ae6daa680a5f5f5fb9c6a15296e5e88c97cd770a
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix ElDoc's eldoc-documentation-enthusiast strategy
As soon as we get a response from any of the user functions/sources in
eldoc-documentation-functions, we must make sure to call the
display-doc local function, just like in the other strategies.
That is even if that response produced nil, meaning that there's no
doc coming from that source. Failure to do so when none of the
sources produced non-nil would keep stale documentation displaying.
First reported in https://github.com/joaotavora/eglot/issues/503
* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Fix
:enthusiast strategy.
(Version): Bump to 1.10.0
---
lisp/emacs-lisp/eldoc.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 6bb732e..772c907 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -5,7 +5,7 @@
;; Author: Noah Friedman <friedman@splode.com>
;; Keywords: extensions
;; Created: 1995-10-06
-;; Version: 1.9.0
+;; Version: 1.10.0
;; Package-Requires: ((emacs "26.3"))
;; This is a GNU ELPA :core package. Avoid functionality that is not
@@ -740,14 +740,14 @@ should endeavour to display the docstrings eventually
produced."
(when (and string (cl-loop for (p) in docs-registered
never (< p pos)))
(setq docs-registered '())
- (register-doc pos string plist)
- (when (and (timerp eldoc--enthusiasm-curbing-timer)
- (memq eldoc--enthusiasm-curbing-timer
- timer-list))
- (cancel-timer eldoc--enthusiasm-curbing-timer))
- (setq eldoc--enthusiasm-curbing-timer
- (run-at-time (unless (zerop pos) 0.3)
- nil #'display-doc)))
+ (register-doc pos string plist))
+ (when (and (timerp eldoc--enthusiasm-curbing-timer)
+ (memq eldoc--enthusiasm-curbing-timer
+ timer-list))
+ (cancel-timer eldoc--enthusiasm-curbing-timer))
+ (setq eldoc--enthusiasm-curbing-timer
+ (run-at-time (unless (zerop pos) 0.3)
+ nil #'display-doc))
t))
(:patient
(cl-incf want)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ae6daa6: Fix ElDoc's eldoc-documentation-enthusiast strategy,
Jo�o T�vora <=