diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-09-21 21:45:02 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-09-21 21:45:02 +0200 |
commit | 5a8be1719a80031ea3833749b1e82de8d5a39787 (patch) | |
tree | 1f3cb774fd9e222b7d4f2f426695e7894ee7b297 /lisp/emacs-lisp/eldoc.el | |
parent | 5b41545f1be367837d9ac717ea67fba19a4c24d4 (diff) | |
parent | fb68645b5a258c98acc11efdc3caae80683cc6b0 (diff) | |
download | emacs-5a8be1719a80031ea3833749b1e82de8d5a39787.tar.gz emacs-5a8be1719a80031ea3833749b1e82de8d5a39787.tar.bz2 emacs-5a8be1719a80031ea3833749b1e82de8d5a39787.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
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 |