summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-07-15 23:13:59 +0200
committerAndrea Corallo <akrl@sdf.org>2020-07-15 23:13:59 +0200
commit907618b3b51a653d111d7f5764da586fcee6da5e (patch)
treeddde8eb9f40da415fc7699d16948eb9638804588 /lisp/emacs-lisp
parent2c2cc21f1be721e5ba30fa22aedeb5c254791193 (diff)
parent85eaa8373bb0a91013af503d333670788ec5a956 (diff)
downloademacs-907618b3b51a653d111d7f5764da586fcee6da5e.tar.gz
emacs-907618b3b51a653d111d7f5764da586fcee6da5e.tar.bz2
emacs-907618b3b51a653d111d7f5764da586fcee6da5e.zip
Merge remote-tracking branch 'savahnna/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/eldoc.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 1dd0ea2942d..510dff9ed0b 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -92,7 +92,7 @@ echo area must be resized to fit.
If value is a number (integer or floating point), it has the
semantics of `max-mini-window-height', constraining the resizing
-for Eldoc purposes only.
+for ElDoc purposes only.
Any resizing respects `max-mini-window-height'.
@@ -112,9 +112,9 @@ single line of display in the echo area."
line" truncate-sym-name-if-fit)))
(defcustom eldoc-prefer-doc-buffer nil
- "Prefer Eldoc's documentation buffer if it is showing in some frame.
+ "Prefer ElDoc's documentation buffer if it is showing in some frame.
If this variable's value is t and a piece of documentation needs
-to be truncated to fit in the echo area, do so if Eldoc's
+to be truncated to fit in the echo area, do so if ElDoc's
documentation buffer is not already showing, since the buffer
always holds the full documentation."
:type 'boolean)
@@ -495,8 +495,9 @@ Honor most of `eldoc-echo-area-use-multiline-p'."
(substitute-command-keys "\\[eldoc-doc-buffer]")))))))))
((= available 1)
;; Truncate "brutally." ; FIXME: use `eldoc-prefer-doc-buffer' too?
- (truncate-string-to-width
- (buffer-substring (point-min) (line-end-position 1)) width)))))
+ (with-current-buffer (eldoc-doc-buffer)
+ (truncate-string-to-width
+ (buffer-substring (point-min) (line-end-position 1)) width))))))
(when echo-area-message
(eldoc--message echo-area-message))))))
@@ -539,11 +540,11 @@ Meant as a value for `eldoc-documentation-strategy'."
(if (stringp str) (funcall callback str))
nil))))
-;; JT@2020-07-10: Eldoc is pre-loaded, so in in Emacs < 28 we can't
+;; JT@2020-07-10: ElDoc is pre-loaded, so in Emacs < 28 we can't
;; make the "old" `eldoc-documentation-function' point to the new
;; `eldoc-documentation-strategy', so we do the reverse. This allows
-;; for Eldoc to be loaded in those older Emacs versions and work with
-;; whomever (major-modes, extensions, ueser) sets one of the other
+;; for ElDoc to be loaded in those older Emacs versions and work with
+;; whomever (major-modes, extensions, user) sets one or the other
;; variable.
(defmacro eldoc--documentation-strategy-defcustom
(main secondary value docstring &rest more)