bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#43543: 28.0.50; Supress truncate notice in eldoc


From: João Távora
Subject: bug#43543: 28.0.50; Supress truncate notice in eldoc
Date: Sun, 04 Oct 2020 12:16:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Yuan Fu <casouri@gmail.com> writes:
>
>> Actually, when I set line number to 2, eldoc only shows one line with
>> an ending “…”, and if I set to 3 lines, eldoc shows two lines with an
>> ending “…”.
>
> This should now be fixed on the trunk.

Hi Lars and Yuan.  I've been working a bit more on ElDoc recently in the
scratch/eldoc-display-functions branch.  There, a clean separation
between different outlets of doc display is achieved.  The echo area is
just one of them, handled by eldoc-display-in-echo-area.  So I think
this new variable should be better named
eldoc-echo-area-display-truncation-message, so we have some consistency
in the names of variables that affect this display tactic:

- eldoc-echo-area-display-truncation-message
- eldoc-echo-area-use-multiline-p
- eldoc-echo-area-prefer-doc-buffer

Path after my sig.  I don't think we need a backward compatibility
alias, since the user option has been around for a relatively short time
in master only.

João

diff --git a/etc/NEWS b/etc/NEWS
index d1db797eb3..b6f99067dd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -591,7 +591,7 @@ definition.
 ** ElDoc
 
 +++
-*** New user option 'eldoc-display-truncation-message'.
+*** New user option 'eldoc-echo-area-display-truncation-message'.
 If non-nil (the default), eldoc will display a message saying
 something like "(Documentation truncated. Use `M-x eldoc-doc-buffer'
 to see rest)" when a message has been truncated.  If nil, truncated
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 9573dac6d7..f7a624f9ae 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -67,7 +67,7 @@ eldoc-print-after-edit
 Changing the value requires toggling `eldoc-mode'."
   :type 'boolean)
 
-(defcustom eldoc-display-truncation-message t
+(defcustom eldoc-echo-area-display-truncation-message t
   "If non-nil, provide verbose help when a message has been truncated.
 If nil, truncated messages will just have \"...\" appended."
   :type 'boolean
@@ -535,7 +535,7 @@ eldoc-display-in-echo-area
               ((> available 1)
                ;; The message takes one extra line, so if we don't
                ;; display that, we have one extra line to use.
-               (unless eldoc-display-truncation-message
+               (unless eldoc-echo-area-display-truncation-message
                  (setq available (1+ available)))
                ;; Else we format the *eldoc* buffer, then use some of
                ;; its contents top section.  I'm pretty sure smarter
@@ -561,7 +561,7 @@ eldoc-display-in-echo-area
                       (buffer-substring (point-min) (point))
                       (and
                        truncated
-                       (if eldoc-display-truncation-message
+                       (if eldoc-echo-area-display-truncation-message
                            (format
                             "\n(Documentation truncated. Use `%s' to see rest)"
                             (substitute-command-keys "\\[eldoc-doc-buffer]"))






reply via email to

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