aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2020-11-26 11:24:20 +0100
committerLars Ingebrigtsen2020-11-26 11:24:20 +0100
commit0287c5176867628e7acb834b3d5f26a150cfaf85 (patch)
tree14781bfb34515092a3fee93b4a1a5b557f93f6d4
parentd23723cfb24b87170f53ce615bff083ef2d7e76a (diff)
downloademacs-0287c5176867628e7acb834b3d5f26a150cfaf85.tar.gz
emacs-0287c5176867628e7acb834b3d5f26a150cfaf85.zip
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>.
-rw-r--r--lisp/emacs-lisp/eldoc.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 78cb8f08c34..d81060ef165 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -591,7 +591,8 @@ Honor `eldoc-echo-area-use-multiline-p' and
591 ;; format the *eldoc* buffer, using as most of its 591 ;; format the *eldoc* buffer, using as most of its
592 ;; contents as we know will fit. 592 ;; contents as we know will fit.
593 (with-current-buffer (eldoc--format-doc-buffer docs) 593 (with-current-buffer (eldoc--format-doc-buffer docs)
594 (eldoc--echo-area-substring available))) 594 (save-excursion
595 (eldoc--echo-area-substring available))))
595 (t ;; this is the "truncate brutally" situation 596 (t ;; this is the "truncate brutally" situation
596 (let ((string 597 (let ((string
597 (with-current-buffer (eldoc--format-doc-buffer docs) 598 (with-current-buffer (eldoc--format-doc-buffer docs)