[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot e964abe 091/139: Get rid of eglot--buffer-open-co
From: |
João Távora |
Subject: |
[elpa] externals/eglot e964abe 091/139: Get rid of eglot--buffer-open-count |
Date: |
Mon, 14 May 2018 09:55:00 -0400 (EDT) |
branch: externals/eglot
commit e964abeba3e1f164fa05e9f7aaa79c4419ee1fe7
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Get rid of eglot--buffer-open-count
Hasn't really proved useful yet.
* eglot.el (eglot--buffer-open-count): Remove.
(eglot--signal-textDocument/didOpen)
(eglot--signal-textDocument/didClose): Simplify.
---
eglot.el | 35 ++++++++---------------------------
1 file changed, 8 insertions(+), 27 deletions(-)
diff --git a/eglot.el b/eglot.el
index 1318fee..a600f47 100644
--- a/eglot.el
+++ b/eglot.el
@@ -135,9 +135,6 @@ A list (WHAT SERIOUS-P)." t)
Either a list of strings (a shell command and arguments), or a
list of a single string of the form <host>:<port>")
-(eglot--define-process-var eglot--buffer-open-count (make-hash-table)
- "Keeps track of didOpen/didClose notifs for each buffer.")
-
(defun eglot--make-process (name managed-major-mode contact)
"Make a process from CONTACT.
NAME is a name to give the inferior process or connection.
@@ -1158,33 +1155,17 @@ Records START, END and PRE-CHANGE-LENGTH locally."
(defun eglot--signal-textDocument/didOpen ()
"Send textDocument/didOpen to server."
- (let* ((proc (eglot--current-process-or-lose))
- (count (1+ (or (gethash (current-buffer)
- (eglot--buffer-open-count proc))
- 0))))
- (when (> count 1)
- (eglot--error "Too many textDocument/didOpen notifs for %s"
(current-buffer)))
- (setf (gethash (current-buffer) (eglot--buffer-open-count proc))
- count)
- (eglot--notify proc
- :textDocument/didOpen
- (eglot--obj :textDocument
- (eglot--current-buffer-TextDocumentItem)))))
+ (eglot--notify (eglot--current-process-or-lose)
+ :textDocument/didOpen
+ (eglot--obj :textDocument
+ (eglot--current-buffer-TextDocumentItem))))
(defun eglot--signal-textDocument/didClose ()
"Send textDocument/didClose to server."
- (let* ((proc (eglot--current-process-or-lose))
- (count (1- (or (gethash (current-buffer)
- (eglot--buffer-open-count proc))
- 0))))
- (when (< count 0)
- (eglot--error "Too many textDocument/didClose notifs for %s"
(current-buffer)))
- (setf (gethash (current-buffer) (eglot--buffer-open-count proc))
- count)
- (eglot--notify proc
- :textDocument/didClose
- (eglot--obj :textDocument
-
(eglot--current-buffer-TextDocumentIdentifier)))))
+ (eglot--notify (eglot--current-process-or-lose)
+ :textDocument/didClose
+ (eglot--obj :textDocument
+ (eglot--current-buffer-TextDocumentIdentifier))))
(defun eglot--signal-textDocument/willSave ()
"Send textDocument/willSave to server."
- [elpa] externals/eglot 1fb2bcb 132/139: Ask server for textDocument/signatureHelp if it supports it, (continued)
- [elpa] externals/eglot 1fb2bcb 132/139: Ask server for textDocument/signatureHelp if it supports it, João Távora, 2018/05/14
- [elpa] externals/eglot e63dad0 092/139: Simplify mode-line code with a helper., João Távora, 2018/05/14
- [elpa] externals/eglot ab575d2 120/139: Rename functions. eglot--request is now the synchronous one, João Távora, 2018/05/14
- [elpa] externals/eglot 41f5922 137/139: Now send willSaveWaitUntil, João Távora, 2018/05/14
- [elpa] externals/eglot 458bc69 110/139: More correctly setup rust-mode-related autoloads, João Távora, 2018/05/14
- [elpa] externals/eglot 9af84a2 124/139: Prepare to sumbit to GNU ELPA, João Távora, 2018/05/14
- [elpa] externals/eglot 0625b6c 123/139: (eglot--xref-make): Fix Use of cl-destructuring-bind., João Távora, 2018/05/14
- [elpa] externals/eglot 589e1ea 138/139: Remove an unused variable, João Távora, 2018/05/14
- [elpa] externals/eglot 49fb02f 135/139: Use RLS in Travis CI and add actual tests, João Távora, 2018/05/14
- [elpa] externals/eglot dc08e8e 134/139: Fix automatic project creation, João Távora, 2018/05/14
- [elpa] externals/eglot e964abe 091/139: Get rid of eglot--buffer-open-count,
João Távora <=
- [elpa] externals/eglot c7b9002 116/139: Only call deferred actions after a full message has been received, João Távora, 2018/05/14
- [elpa] externals/eglot 418412b 131/139: Fix copyright header. Obviously not since 2003, João Távora, 2018/05/14
- [elpa] externals/eglot 714e5be 086/139: Half-baked textDocument/hover support, João Távora, 2018/05/14
- [elpa] externals/eglot bfd82b5 108/139: Fancier RLS spinner, João Távora, 2018/05/14
- [elpa] externals/eglot 8a80fb7 105/139: Simplify `eglot-shutdown`, João Távora, 2018/05/14
- [elpa] externals/eglot af14364 093/139: Only request stuff that server says it's capable of, João Távora, 2018/05/14
- [elpa] externals/eglot 77856c2 130/139: Reinstate the catch/loop/throw idiom in eglot-request, João Távora, 2018/05/14
- [elpa] externals/eglot 29f58a6 127/139: Get rid of catch/loop/throw idiom (suggested by Thien-Thi Nguyen), João Távora, 2018/05/14
- [elpa] externals/eglot d0b7773 117/139: Reduce log chatter, João Távora, 2018/05/14
- [elpa] externals/eglot 8448d9b 133/139: Work with any old directory, no formal project needed, João Távora, 2018/05/14