summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/float-sup.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2020-07-19 00:48:43 +0100
committerJoão Távora <joaotavora@gmail.com>2020-07-23 11:57:27 +0100
commitfcd43287b3d36a5706760d68b7d88502ebe43a47 (patch)
treec7ec4a1dd15ba9dabbdcfb2135cf687efbe6f3ef /lisp/emacs-lisp/float-sup.el
parent1bae7ba53b8239201853ce755e9e21a96ad279c0 (diff)
downloademacs-fcd43287b3d36a5706760d68b7d88502ebe43a47.tar.gz
emacs-fcd43287b3d36a5706760d68b7d88502ebe43a47.tar.bz2
emacs-fcd43287b3d36a5706760d68b7d88502ebe43a47.zip
Don't needlessly request docs from ElDoc functions
Fixes: bug#42421 Do this conservatively for now: if the ElDoc helper buffer (as returned by eldoc--doc-buffer) is visible and showing documentation for the very same "situation" (as computed by the the new eldoc--request-state helper), don't request that documentation from sources again. Before this change, not only was that request inefficient but if the user invoked scroll-other-window to see more of the helper buffer, that would eventually cause it to be reformatted and unexpectedly recentered. Later on, when a customizable list of documentation "sinks" is offered to the user, say, something like eldoc-display-functions, this process must be consolidated. In those circumstances, as soon as one of those sinks signals that it doesn't have up-to-date documentation for the state computed by eldoc--request-state, documentation will have to be requested anew from eldoc-documentation-functions via eldoc--invoke-strategy. * lisp/emacs-lisp/eldoc.el (eldoc--request-docs-p): Rework from eglot-display-message-p. (eldoc--last-request-state): New variable. (eldoc--request-state): New helper. (eldoc--handle-docs): Memorize state of request in doc buffer. (eldoc-print-current-symbol-info): Pass a token to eldoc--request-docs-p. (Version): Bump to 1.6.0
Diffstat (limited to 'lisp/emacs-lisp/float-sup.el')
0 files changed, 0 insertions, 0 deletions