emacs-diffs
[Top][All Lists]
Advanced

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

master 3c539cb5b3: Make eldoc-echo-area-prefer-doc-buffer consider all f


From: João Távora
Subject: master 3c539cb5b3: Make eldoc-echo-area-prefer-doc-buffer consider all frames
Date: Tue, 19 Jul 2022 19:37:14 -0400 (EDT)

branch: master
commit 3c539cb5b3a650276e946895b2bf0ceb372a8983
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Make eldoc-echo-area-prefer-doc-buffer consider all frames
    
    Previously, it considered only windows on 'visible' frames (according
    to get-buffer-window).  This seemed correct at first, but it's not
    much use for multiple TTY frames and not particularly reliable on GUI
    frames either.  There's no reliable way to tell what is actually
    visible, so it's best to assume that users setup frames that are
    indeed visible when using this parameter.
    
    * lisp/emacs-lisp/eldoc.el (eldoc--echo-area-prefer-doc-buffer-p):
    Consider all frames.
---
 lisp/emacs-lisp/eldoc.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 724453d766..e5f055d032 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -551,12 +551,13 @@ Helper for `eldoc-display-in-echo-area'."
 (defun eldoc--echo-area-prefer-doc-buffer-p (truncatedp)
   "Tell if display in the echo area should be skipped.
 Helper for `eldoc-display-in-echo-area'.  If TRUNCATEDP the
-documentation to potentially appear in the echo are is truncated."
+documentation to potentially appear in the echo area is
+known to be truncated."
   (and (or (eq eldoc-echo-area-prefer-doc-buffer t)
            (and truncatedp
                 (eq eldoc-echo-area-prefer-doc-buffer
                     'maybe)))
-       (get-buffer-window eldoc--doc-buffer 'visible)))
+       (get-buffer-window eldoc--doc-buffer t)))
 
 (defun eldoc-display-in-echo-area (docs _interactive)
   "Display DOCS in echo area.



reply via email to

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