emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0287c51: Keep point in the *eldoc* buffer in eldoc-display-in-ech


From: Lars Ingebrigtsen
Subject: master 0287c51: Keep point in the *eldoc* buffer in eldoc-display-in-echo-area
Date: Thu, 26 Nov 2020 05:25:20 -0500 (EST)

branch: master
commit 0287c5176867628e7acb834b3d5f26a150cfaf85
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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>.
---
 lisp/emacs-lisp/eldoc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 78cb8f0..d81060e 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
                ;; 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]