[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 487cde5 18/71: Close #443: kind of honour eldoc-ec
From: |
João Távora |
Subject: |
[elpa] externals/elpa 487cde5 18/71: Close #443: kind of honour eldoc-echo-area-use-multiline-p |
Date: |
Wed, 16 Dec 2020 11:42:16 -0500 (EST) |
branch: externals/elpa
commit 487cde5f7c8eeac5e2ed105c887d0547b94d14b7
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Close #443: kind of honour eldoc-echo-area-use-multiline-p
A reworking of an idea and original implementation by Andrii
Kolomoiets <andreyk.mad@gmail.com>. It doesn't honor it completely
because the semantics for a non-t, non-nil value are tricky. And we
don't always exactly know what the symbol prefix reliably.
* eglot.el (eglot--update-doc): Kind of honour
eldoc-echo-area-use-multiline-p.
---
eglot.el | 53 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 23 deletions(-)
diff --git a/eglot.el b/eglot.el
index adfd4e2..436e5bf 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2288,29 +2288,36 @@ Buffer is displayed with `display-buffer', which obeys
Honours `eglot-put-doc-in-help-buffer'. HINT is used to
potentially rename EGLOT's help buffer. If STRING is nil, the
echo area cleared of any previous documentation."
- (if (and string
- (or (eq t eglot-put-doc-in-help-buffer)
- (and eglot-put-doc-in-help-buffer
- (funcall eglot-put-doc-in-help-buffer string))))
- (with-current-buffer (eglot--help-buffer)
- (let ((inhibit-read-only t)
- (name (format "*eglot-help for %s*" hint)))
- (unless (string= name (buffer-name))
- (rename-buffer (format "*eglot-help for %s*" hint))
- (erase-buffer)
- (insert string)
- (goto-char (point-min)))
- (if eglot-auto-display-help-buffer
- (display-buffer (current-buffer))
- (unless (get-buffer-window (current-buffer))
- (eglot--message
- "%s\n(...truncated. Full help is in `%s')"
- (truncate-string-to-width
- (replace-regexp-in-string "\\(.*\\)\n.*" "\\1" string)
- (frame-width) nil nil "...")
- (buffer-name eglot--help-buffer))))
- (help-mode)))
- (eldoc-message string)))
+ (cond ((and string
+ (or (eq t eglot-put-doc-in-help-buffer)
+ (and eglot-put-doc-in-help-buffer
+ (funcall eglot-put-doc-in-help-buffer string))))
+ (with-current-buffer (eglot--help-buffer)
+ (let ((inhibit-read-only t)
+ (name (format "*eglot-help for %s*" hint)))
+ (unless (string= name (buffer-name))
+ (rename-buffer (format "*eglot-help for %s*" hint))
+ (erase-buffer)
+ (insert string)
+ (goto-char (point-min)))
+ (if eglot-auto-display-help-buffer
+ (display-buffer (current-buffer))
+ (unless (get-buffer-window (current-buffer))
+ (eglot--message
+ "%s\n(...truncated. Full help is in `%s')"
+ (truncate-string-to-width
+ (replace-regexp-in-string "\\(.*\\)\n.*" "\\1" string)
+ (frame-width) nil nil "...")
+ (buffer-name eglot--help-buffer))))
+ (help-mode))))
+ (eldoc-echo-area-use-multiline-p
+ (eldoc-message string))
+ (t
+ (eldoc-message
+ (and string
+ (if (string-match "\n" string)
+ (substring string (match-end 0))
+ string))))))
(defun eglot-eldoc-function ()
"EGLOT's `eldoc-documentation-function' function."
- [elpa] branch externals/elpa created (now 4edd478), João Távora, 2020/12/16
- [elpa] externals/elpa 8b94cf4 02/71: Per #397: Add new eglot-lsp-abiding-column test, João Távora, 2020/12/16
- [elpa] externals/elpa 1056ef5 03/71: Close #413: update dependencies and copyright years, João Távora, 2020/12/16
- [elpa] externals/elpa d99a447 12/71: Close #439: Hide eldoc-message on empty hover info, João Távora, 2020/12/16
- [elpa] externals/elpa af32ebf 06/71: Close #444: use text-mode for plaintext markup, João Távora, 2020/12/16
- [elpa] externals/elpa ef6c483 13/71: Fix #452: also check types when destructuring LSP objects, João Távora, 2020/12/16
- [elpa] externals/elpa 487cde5 18/71: Close #443: kind of honour eldoc-echo-area-use-multiline-p,
João Távora <=
- [elpa] externals/elpa 22aa27c 01/71: Close #397: Simplify a bit of code, João Távora, 2020/12/16
- [elpa] externals/elpa 8900a35 04/71: Prevent "Cant guess python-indent-offset..." messages in tests, João Távora, 2020/12/16
- [elpa] externals/elpa dd48f4a 08/71: * eglot.el (eglot-put-doc-in-help-buffer): Tiny docstring fix., João Távora, 2020/12/16
- [elpa] externals/elpa e5cf30e 09/71: Close #435: create match xrefs when possible, João Távora, 2020/12/16
- [elpa] externals/elpa ad3f049 24/71: Close #417: minimally document relation with project.el, João Távora, 2020/12/16
- [elpa] externals/elpa 2f75da2 28/71: Fix #460: fix "free variable" warning, João Távora, 2020/12/16
- [elpa] externals/elpa 0f57efb 26/71: Simplify bug-reporting instructions, João Távora, 2020/12/16
- [elpa] externals/elpa 91a7cba 33/71: Fix #474, #478: prompt for executable if supplied name does not exist, João Távora, 2020/12/16
- [elpa] externals/elpa 9efe207 05/71: Make curl invocation fail more explicitly in .travis.yml, João Távora, 2020/12/16
- [elpa] externals/elpa 73bc752 11/71: Close #441: shield tests from some user customizations, João Távora, 2020/12/16