1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00

Keep point in the *eldoc* buffer in eldoc-display-in-echo-area

* lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Use
'save-excursion' to keep point position in *eldoc* buffer.
Suggested by Andrii Kolomoiets <andreyk.mad@gmail.com>.
This commit is contained in:
Lars Ingebrigtsen 2020-11-26 11:24:20 +01:00
parent d23723cfb2
commit 0287c51768

View File

@ -591,7 +591,8 @@ Honor `eldoc-echo-area-use-multiline-p' and
;; format the *eldoc* buffer, using as most of its
;; contents as we know will fit.
(with-current-buffer (eldoc--format-doc-buffer docs)
(eldoc--echo-area-substring available)))
(save-excursion
(eldoc--echo-area-substring available))))
(t ;; this is the "truncate brutally" situation
(let ((string
(with-current-buffer (eldoc--format-doc-buffer docs)