[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot cc183a6 043/139: Fix assorted bugs
From: |
João Távora |
Subject: |
[elpa] externals/eglot cc183a6 043/139: Fix assorted bugs |
Date: |
Mon, 14 May 2018 09:54:51 -0400 (EDT) |
branch: externals/eglot
commit cc183a6c62567bf7fb6303e133455ad9c8da7479
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix assorted bugs
* eglot.el (eglot--special-buffer-process): Must be buffer-local.
(eglot--define-process-var): Fix disaster waiting to happen.
(eglot--process-receive): Explicitly pass PROC to
eglot--pending-continuations.
(eglot--textDocument/publishDiagnostics): Clear unreported diagnostics
---
eglot.el | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/eglot.el b/eglot.el
index f4ac858..5c014f3 100644
--- a/eglot.el
+++ b/eglot.el
@@ -48,7 +48,7 @@
(defvar eglot-editing-mode) ; forward decl
(defvar eglot-mode) ; forward decl
-(defvar eglot--special-buffer-process nil
+(defvar-local eglot--special-buffer-process nil
"Current buffer's eglot process.")
(defun eglot--current-process ()
@@ -78,13 +78,14 @@ after setting it."
(declare (indent 2))
`(progn
(put ',var-sym 'function-documentation ,doc)
- (defun ,var-sym (&optional process)
- (let* ((proc (or process (eglot--current-process-or-lose)))
- (probe (process-get proc ',var-sym)))
- (or probe
- (let ((def ,initval))
- (process-put proc ',var-sym def)
- def))))
+ (defun ,var-sym (proc)
+ (let* ((plist (process-plist proc))
+ (probe (plist-member plist ',var-sym)))
+ (if probe
+ (cadr probe)
+ (let ((def ,initval))
+ (process-put proc ',var-sym def)
+ def))))
(gv-define-setter ,var-sym (to-store &optional process)
(let* ((prop ',var-sym))
,(let ((form '(let ((proc (or ,process
(eglot--current-process-or-lose))))
@@ -417,7 +418,8 @@ identifier. ERROR is non-nil if this is an error."
(let* ((response-id (plist-get message :id))
(err (plist-get message :error))
(continuations (and response-id
- (gethash response-id
(eglot--pending-continuations)))))
+ (gethash response-id
+ (eglot--pending-continuations proc)))))
(eglot--log-event proc
(cond ((not response-id)
'server-notification)
@@ -436,7 +438,7 @@ identifier. ERROR is non-nil if this is an error."
(continuations
(cancel-timer (cl-third continuations))
(remhash response-id
- (eglot--pending-continuations))
+ (eglot--pending-continuations proc))
(cond (err
(apply (cl-second continuations) err))
(t
@@ -655,11 +657,12 @@ running. INTERACTIVE is t if called interactively."
message))))
into diags
finally
- (if eglot--current-flymake-report-fn
- (funcall eglot--current-flymake-report-fn
- diags)
- (setq eglot--unreported-diagnostics
- diags))))))
+ (if (null eglot--current-flymake-report-fn)
+ (setq eglot--unreported-diagnostics
+ diags)
+ (funcall eglot--current-flymake-report-fn
+ diags)
+ (setq eglot--unreported-diagnostics nil))))))
(t
(eglot--message "OK so %s isn't visited" filename)))))
- [elpa] externals/eglot 29d4103 056/139: Fix mode-line mouse-clicks from outside selected window, (continued)
- [elpa] externals/eglot 29d4103 056/139: Fix mode-line mouse-clicks from outside selected window, João Távora, 2018/05/14
- [elpa] externals/eglot b1554fc 055/139: * eglot.el (eglot--process-receive): Skip null method notifs., João Távora, 2018/05/14
- [elpa] externals/eglot 51ff863 046/139: Must re-announce didOpen after reconnect, João Távora, 2018/05/14
- [elpa] externals/eglot c95a0a4 041/139: Multiple servers per project are possible, João Távora, 2018/05/14
- [elpa] externals/eglot f8bfb7e 064/139: Handle requests from server correctly, João Távora, 2018/05/14
- [elpa] externals/eglot b69302c 060/139: Make M-x eglot's interactive spec a separate function, João Távora, 2018/05/14
- [elpa] externals/eglot b657b32 068/139: Use rootUri instead of rootPath, João Távora, 2018/05/14
- [elpa] externals/eglot 7d0bf64 062/139: Workaround RLS's regusal to treat nil as empty json object, João Távora, 2018/05/14
- [elpa] externals/eglot 75495dc 033/139: Slightly more user friendly start, João Távora, 2018/05/14
- [elpa] externals/eglot fdb4de1 039/139: Simplify flymake integration, João Távora, 2018/05/14
- [elpa] externals/eglot cc183a6 043/139: Fix assorted bugs,
João Távora <=
- [elpa] externals/eglot df5d76d 065/139: Reply to client/registerCapability (don't handle it yet), João Távora, 2018/05/14
- [elpa] externals/eglot c2862f4 063/139: Don't auto-reconnect if last attempt lasted less than 3 seconds, João Távora, 2018/05/14
- [elpa] externals/eglot f1b6485 053/139: Trim some edges and add a bunch of boring RPC methods, João Távora, 2018/05/14
- [elpa] externals/eglot 0e95167 042/139: Watch for files opened under umbrella of existing process, João Távora, 2018/05/14
- [elpa] externals/eglot 4d4b85d 061/139: eglot-editing-mode becomes eglot--managed-mode, João Távora, 2018/05/14
- [elpa] externals/eglot e7ffc31 067/139: Make reported capabilities into its own function, João Távora, 2018/05/14
- [elpa] externals/eglot 79a2a1e 069/139: Be quite explicit about our lack of capabilities right now, João Távora, 2018/05/14
- [elpa] externals/eglot 95187cf 058/139: Connect to LSP server via TCP, João Távora, 2018/05/14
- [elpa] externals/eglot f76f04e 057/139: More correctly keep track of didOpen/didClose per buffer, João Távora, 2018/05/14
- [elpa] externals/eglot 46bb1c0 049/139: Reorganize file, João Távora, 2018/05/14