]> git.eshelyaron.com Git - emacs.git/commit
Fix test failure introduced by previous commit
authorJoão Távora <joaotavora@gmail.com>
Sun, 6 Jan 2019 12:55:21 +0000 (12:55 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sun, 6 Jan 2019 12:55:21 +0000 (12:55 +0000)
commit84234b25ba59dd593e0f77bb4a54c03281519567
tree328e9ca8b3c7d281af1b6999679a87ca33d46c55
parentaedb0d33de82595822a6fe56f40fdf608adc37c7
Fix test failure introduced by previous commit

Remove the hack of unsetting eldoc-last-message in
eglot--eldoc-message.  This allows any subsequent eglot-eldoc-function
calls (prompted by simple cursor movement) to return it immediately,
thus refreshing the help buffer with the same contents.  For this to
work, we also have to set eglot--eldoc-hint globally in
eglot-eldoc-function.

An alternative to making the test pass would be to keep the hack of
unsetting eldoc-last-message only in the case that we actually get to
display the help buffer.  This would actually be more efficient, but
potentially more hacky.

The bottom line here is that eldoc doesn't have a good API to deal
with asynchronous docstring fetching.  See this thread:

https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00151.html

* eglot.el (eglot--eldoc-message): Don't unset eldoc-last-message.
(eglot-eldoc-function): Set eglot--eldoc-hint for synchronous
operation too.
lisp/progmodes/eglot.el