]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't block kill-buffer-hook if server somehow hangs
authorJoão Távora <joaotavora@gmail.com>
Mon, 17 Sep 2018 09:00:16 +0000 (10:00 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 17 Sep 2018 09:00:16 +0000 (10:00 +0100)
* eglot.el (eglot--signal-textDocument/didClose): Use
with-demoted-errors.

GitHub-reference: close https://github.com/joaotavora/eglot/issues/115

lisp/progmodes/eglot.el

index 1a702543b962fc50a608e1b0510894d0eb9cd447..959cc5d1b8df29dbe37b913a2e45c781ac9b9920 100644 (file)
@@ -1223,9 +1223,11 @@ When called interactively, use the currently active server"
 
 (defun eglot--signal-textDocument/didClose ()
   "Send textDocument/didClose to server."
-  (jsonrpc-notify
-   (eglot--current-server-or-lose)
-   :textDocument/didClose `(:textDocument ,(eglot--TextDocumentIdentifier))))
+  (with-demoted-errors
+      "[eglot] error sending textDocument/didClose: %s"
+    (jsonrpc-notify
+     (eglot--current-server-or-lose)
+     :textDocument/didClose `(:textDocument ,(eglot--TextDocumentIdentifier)))))
 
 (defun eglot--signal-textDocument/willSave ()
   "Send textDocument/willSave to server."