diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-21 14:15:34 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-21 14:15:39 +0200 |
commit | e72d3793bcec67f9312e9d011e4357f8986bf837 (patch) | |
tree | fbe846690cc4ab0f03cf0e611fc07ac7de60cca5 /lisp/emacs-lisp | |
parent | 4cb1e30988cc5c30bfc27a393c9b616870a3fc9e (diff) | |
download | emacs-e72d3793bcec67f9312e9d011e4357f8986bf837.tar.gz emacs-e72d3793bcec67f9312e9d011e4357f8986bf837.tar.bz2 emacs-e72d3793bcec67f9312e9d011e4357f8986bf837.zip |
Allow disabling the verbose eldoc truncation message
* doc/emacs/programs.texi (Lisp Doc): Document it.
* lisp/emacs-lisp/eldoc.el (eldoc-display-truncation-message): New
variable (bug#43543).
(eldoc--handle-docs): Use it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/eldoc.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 772c907c284..f8768051d14 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -67,6 +67,12 @@ If this variable is set to 0, no idle time is required." Changing the value requires toggling `eldoc-mode'." :type 'boolean) +(defcustom eldoc-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 + :version "28.1") + ;;;###autoload (defcustom eldoc-minor-mode-string (purecopy " ElDoc") "String to display in mode line when ElDoc Mode is enabled; nil for none." @@ -524,10 +530,13 @@ Honor most of `eldoc-echo-area-use-multiline-p'." (cl-return (concat (buffer-substring (point-min) (point)) - (and truncated + (and + truncated + (if eldoc-display-truncation-message (format "\n(Documentation truncated. Use `%s' to see rest)" - (substitute-command-keys "\\[eldoc-doc-buffer]"))))))))) + (substitute-command-keys "\\[eldoc-doc-buffer]")) + "...")))))))) ((= available 1) ;; Truncate "brutally." ; FIXME: use `eldoc-prefer-doc-buffer' too? (with-current-buffer (eldoc-doc-buffer) |