From: João Távora Date: Mon, 17 Sep 2018 09:00:16 +0000 (+0100) Subject: Don't block kill-buffer-hook if server somehow hangs X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~429 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4771f2f6850cc5c2402e0f88ae85a29ab1d76709;p=emacs.git Don't block kill-buffer-hook if server somehow hangs * eglot.el (eglot--signal-textDocument/didClose): Use with-demoted-errors. GitHub-reference: close https://github.com/joaotavora/eglot/issues/115 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 1a702543b96..959cc5d1b8d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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."