[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa e964abe 091/139: Get rid of eglot--buffer-open-cou
From: |
João Távora |
Subject: |
[elpa] externals/elpa e964abe 091/139: Get rid of eglot--buffer-open-count |
Date: |
Mon, 14 May 2018 09:53:42 -0400 (EDT) |
branch: externals/elpa
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/elpa 589e1ea 138/139: Remove an unused variable, (continued)
- [elpa] externals/elpa 589e1ea 138/139: Remove an unused variable, João Távora, 2018/05/14
- [elpa] externals/elpa 571b08f 076/139: Fix the odd bug here and there, João Távora, 2018/05/14
- [elpa] externals/elpa c4ffabc 083/139: Half-decent completion support, João Távora, 2018/05/14
- [elpa] externals/elpa 71e47d2 102/139: Fix odd bugs and tweak stuff, João Távora, 2018/05/14
- [elpa] externals/elpa ecd334f 101/139: Update README, João Távora, 2018/05/14
- [elpa] externals/elpa dda11dd 095/139: Try to fix some textDocument/completion bugs, João Távora, 2018/05/14
- [elpa] externals/elpa bfd82b5 108/139: Fancier RLS spinner, João Távora, 2018/05/14
- [elpa] externals/elpa c7b9002 116/139: Only call deferred actions after a full message has been received, João Távora, 2018/05/14
- [elpa] externals/elpa dc08e8e 134/139: Fix automatic project creation, João Távora, 2018/05/14
- [elpa] externals/elpa e63dad0 092/139: Simplify mode-line code with a helper., João Távora, 2018/05/14
- [elpa] externals/elpa e964abe 091/139: Get rid of eglot--buffer-open-count,
João Távora <=
- [elpa] externals/elpa 37b7329 098/139: Reasonable textDocument/documentHighlight support, João Távora, 2018/05/14
- [elpa] externals/elpa 29f6b4c 129/139: Tweak README.md, João Távora, 2018/05/14
- [elpa] externals/elpa 764347d 128/139: New command eglot-help-at-point and a README update, João Távora, 2018/05/14