[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot e5e5125 04/69: Rename new defcustoms with friendl
From: |
João Távora |
Subject: |
[elpa] externals/eglot e5e5125 04/69: Rename new defcustoms with friendlier names |
Date: |
Sun, 20 Oct 2019 08:21:41 -0400 (EDT) |
branch: externals/eglot
commit e5e5125399f6c1d1eb6f25cd0947d2655f1c1b6d
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Rename new defcustoms with friendlier names
* eglot.el (eglot-doc-too-large-for-echo-area): Rename from
eglot-eldoc-extra-buffer-if-too-large.
(eglot-put-doc-in-help-buffer): Rename from
eglot-eldoc-extra-buffer.
(eglot-auto-display-help-buffer): Rename from
eglot-auto-display-eldoc-extra-buffer.
(eglot--eldoc-message): Use new variable names.
---
eglot.el | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/eglot.el b/eglot.el
index a7740e5..9631c19 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2031,7 +2031,7 @@ is not active."
(rename-buffer (format "*eglot-help for %s*" sym))
(with-current-buffer standard-output (insert blurb)))))))
-(defun eglot-eldoc-extra-buffer-if-too-large (string)
+(defun eglot-doc-too-large-for-echo-area (string)
"Return non-nil if STRING won't fit in echo area.
Respects `max-mini-window-height' (which see)."
(let ((max-height
@@ -2041,18 +2041,18 @@ Respects `max-mini-window-height' (which see)."
(t 1))))
(> (cl-count ?\n string) max-height)))
-(defcustom eglot-eldoc-extra-buffer
- #'eglot-eldoc-extra-buffer-if-too-large
- "If non-nil, put eldoc docstrings in separate `*eglot-help*' buffer.
+(defcustom eglot-put-doc-in-help-buffer
+ #'eglot-doc-too-large-for-echo-area
+ "If non-nil, put \"hover\" documentation in separate `*eglot-help*' buffer.
If nil, use whatever `eldoc-message-function' decides (usually
the echo area). If t, use `*eglot-help; unconditionally. If a
function, it is called with the docstring to display and should a
-boolean."
+boolean producing one of the two previous values."
:type '(choice (const :tag "Never use `*eglot-help*'" nil)
(const :tag "Always use `*eglot-help*'" t)
(function :tag "Ask a function")))
-(defcustom eglot-auto-display-eldoc-extra-buffer nil
+(defcustom eglot-auto-display-help-buffer nil
"If non-nil, automatically display `*eglot-help*' buffer.
Buffer is displayed with `display-buffer', which obeys
`display-buffer-alist' & friends."
@@ -2060,20 +2060,19 @@ Buffer is displayed with `display-buffer', which obeys
(defun eglot--eldoc-message (format &rest args)
(let ((string (apply #'format format args))) ;; FIXME: overworking?
- (when (or (eq t eglot-eldoc-extra-buffer)
- (funcall eglot-eldoc-extra-buffer string))
+ (when (or (eq t eglot-put-doc-in-help-buffer)
+ (funcall eglot-put-doc-in-help-buffer string))
(with-current-buffer (eglot--help-buffer)
(rename-buffer (format "*eglot-help for %s*" eglot--eldoc-hint))
(let ((inhibit-read-only t))
(erase-buffer)
(insert string)
(goto-char (point-min))
- (cond (eglot-auto-display-eldoc-extra-buffer
- (display-buffer (current-buffer)))
- (t
- (unless (get-buffer-window (current-buffer))
- (eglot--message "Help for %s is in %s buffer"
eglot--eldoc-hint
- (buffer-name eglot--help-buffer)))))
+ (if eglot-auto-display-help-buffer
+ (display-buffer (current-buffer))
+ (unless (get-buffer-window (current-buffer))
+ (eglot--message "Help for %s is in %s buffer" eglot--eldoc-hint
+ (buffer-name eglot--help-buffer))))
(help-mode)
t)))))
- [elpa] externals/eglot updated (35597d2 -> 33a4f86), João Távora, 2019/10/20
- [elpa] externals/eglot 4398934 01/69: Fix #198: prevent Eldoc flicker when moving around, João Távora, 2019/10/20
- [elpa] externals/eglot d6a6de7 03/69: Fix test failure introduced by previous commit, João Távora, 2019/10/20
- [elpa] externals/eglot e69cca9 06/69: * README.md: Remove funny UTF character., João Távora, 2019/10/20
- [elpa] externals/eglot 9377988 02/69: Per #198: Show large docs in help buffer instead of echo are by default, João Távora, 2019/10/20
- [elpa] externals/eglot e5e5125 04/69: Rename new defcustoms with friendlier names,
João Távora <=
- [elpa] externals/eglot cba3987 07/69: README.md: minor cosmetic tweaks, João Távora, 2019/10/20
- [elpa] externals/eglot dc371b8 08/69: Display truncated docstring if too large for echo area, João Távora, 2019/10/20
- [elpa] externals/eglot 17ec29b 14/69: Per #177: consider mode derivation when guessing servers, João Távora, 2019/10/20
- [elpa] externals/eglot fcb8ab6 11/69: Per #121: fix bug introduced by commit fixing this issue, João Távora, 2019/10/20
- [elpa] externals/eglot 5fc7ecc 10/69: Add built-in support for Dart's dart_language_server, João Távora, 2019/10/20
- [elpa] externals/eglot 1671dc4 12/69: Fix #209: protect against null messages from eldoc, João Távora, 2019/10/20
- [elpa] externals/eglot dbf2dd2 20/69: * eglot.el (xref-backend-references): Don't use return-from., João Távora, 2019/10/20
- [elpa] externals/eglot 3ecdef1 09/69: Fix #201: handle label offsets in ParameterInformation, João Távora, 2019/10/20
- [elpa] externals/eglot 40a3d8c 16/69: Fix broken python formatting tests, João Távora, 2019/10/20
- [elpa] externals/eglot 1c6c30f 17/69: Disable another test on Travis, João Távora, 2019/10/20