diff options
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r-- | lisp/emacs-lisp/eldoc.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 772c907c284..8fc8db62220 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." @@ -415,7 +421,7 @@ pairs of the form (:KEY VALUE :KEY2 VALUE2...). KEY can be: * `:thing', VALUE is a short string or symbol designating what is being reported on. The documentation display engine can elect - to remove this information depending on space contraints; + to remove this information depending on space constraints; * `:face', VALUE is a symbol designating a face to use when displaying `:thing''s value. @@ -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) @@ -710,7 +719,7 @@ Other third-party strategy functions do not use produce callbacks to feed to `eldoc-documentation-function' and should endeavour to display the docstrings eventually produced." (let* (;; How many callbacks have been created by the strategy - ;; fucntion and passed to elements of + ;; function and passed to elements of ;; `eldoc-documentation-functions'. (howmany 0) ;; How many calls to callbacks we're still waiting on. Used |