On 25.05.2020 20:04, João Távora wrote: > Hi Stefan, Dmitry, Andrii and maintainers, > > Moving the discussion that started in > https://github.com/joaotavora/eglot/pull/459 to the bug tracker, and > attaching the two patches that contain what I think is a decent > short-term solution to the eldoc/async problems. Here's a modified approach that doesn't use a global var and should make it easier to transition to using futures. Patch attached. Example of usage: (add-hook 'eldoc-documentation-functions #'test-eldoc-async 0 t) (defun test-eldoc-async () (cons :async (lambda (cb) (funcall cb "doc here!")))) If you like, we could simplify the returned objects to be just FETCHER (as documented in the patch) rather than (:async . FETCHER). But the latter seems more explicit. There also exist a possible modification of this patch with a bit of functional programming where both calls to eldoc--handle-multiline happen from inside of eldoc-documentation-default's definition.