[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 4b453dc 35/54: Fix #389: avoid double shutdowns a
From: |
Jo�o T�vora |
Subject: |
[elpa] externals/eglot 4b453dc 35/54: Fix #389: avoid double shutdowns and simplify shutdown logic |
Date: |
Thu, 16 Apr 2020 05:31:50 -0400 (EDT) |
branch: externals/eglot
commit 4b453dcde984881e648f1c17c2fc7b147fce7f5b
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix #389: avoid double shutdowns and simplify shutdown logic
* eglot.el (eglot-shutdown): Don't turn off eglot--managed-mode here.
(eglot--on-shutdown): Rather here, but without autoshutdown.
(eglot--managed-mode): Don't check eglot--shutdown-requested.
---
eglot.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/eglot.el b/eglot.el
index d1ff7da..e952b91 100644
--- a/eglot.el
+++ b/eglot.el
@@ -599,9 +599,6 @@ SERVER. ."
;; this one is supposed to always fail, because it asks the
;; server to exit itself. Hence ignore-errors.
(ignore-errors (jsonrpc-request server :exit nil :timeout 1)))
- ;; Turn off `eglot--managed-mode' where appropriate.
- (dolist (buffer (eglot--managed-buffers server))
- (eglot--with-live-buffer buffer (eglot--managed-mode-off)))
;; Now ask jsonrpc.el to shut down the server (which under normal
;; conditions should return immediately).
(jsonrpc-shutdown server (not preserve-buffers))
@@ -611,7 +608,9 @@ SERVER. ."
"Called by jsonrpc.el when SERVER is already dead."
;; Turn off `eglot--managed-mode' where appropriate.
(dolist (buffer (eglot--managed-buffers server))
- (eglot--with-live-buffer buffer (eglot--managed-mode-off)))
+ (let (;; Avoid duplicate shutdowns (github#389)
+ (eglot-autoshutdown nil))
+ (eglot--with-live-buffer buffer (eglot--managed-mode-off))))
;; Kill any expensive watches
(maphash (lambda (_id watches)
(mapcar #'file-notify-rm-watch watches))
@@ -1289,8 +1288,7 @@ For example, to keep your Company customization use
(setf (eglot--managed-buffers server)
(delq (current-buffer) (eglot--managed-buffers server)))
(when (and eglot-autoshutdown
- (not (eglot--shutdown-requested server))
- (not (eglot--managed-buffers server)))
+ (null (eglot--managed-buffers server)))
(eglot-shutdown server)))))))
(defun eglot--managed-mode-off ()
- [elpa] externals/eglot a7a2b52 27/54: Fix #362: unbreak window/showMessageRequest, (continued)
- [elpa] externals/eglot a7a2b52 27/54: Fix #362: unbreak window/showMessageRequest, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot add568b 28/54: Fix #357: allow non-standard keys in textDocument/publishDiagnostics., Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 3879d57 33/54: * eglot.el (eglot-eldoc-function): Fix outdated docstring., Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot a4c83a6 37/54: Merge pull request #400 from joaotavora/scratch/fix-277-exit-notification, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 7c48c7a 39/54: Document the changes in column calculation, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 2fdffef 41/54: Close #405: support bug-reference-prog-mode, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot ce53ca4 44/54: Close #315: introduce and use eglot--{}, the empty JSON object, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 73d3774 24/54: Fix #351: locally tweak imenu-create-index-function, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot b0fdfb0 30/54: Close #379: add built-in support for TeX and friends, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot c9fcbce 32/54: Close #383: add elm-language-server as the language server for Elm, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 4b453dc 35/54: Fix #389: avoid double shutdowns and simplify shutdown logic,
Jo�o T�vora <=
- [elpa] externals/eglot 633979e 38/54: Fix #361: abide by LSP when reporting and moving to columns, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot ae0943f 40/54: Revert the last change about column calculation, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot e53dd5c 46/54: Per #354: make a public reader for project-nickname, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 4f6e152 51/54: Fix #430: send shutdown and exit messages without arguments, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 8332cdf 52/54: Fix eglot-move-to-lsp-abiding-column (#361), Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 864a493 50/54: Close #323: add a simple github issue template, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 4496657 34/54: Close #393: use completing-read in eglot-code-actions, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 9c52f24 36/54: Fix #277: Send exit as a notification, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot 9f10a27 42/54: Explain the animations in the README, Jo�o T�vora, 2020/04/16
- [elpa] externals/eglot e02479a 54/54: * eglot.el (Version): Bump to 1.6, Jo�o T�vora, 2020/04/16