From: Vladimir Panteleev Date: Sun, 6 Oct 2019 16:10:32 +0000 (+0000) Subject: Call shutdown/exit methods with params:{}, not null X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~253 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70e6157b56a6d1534148f6fd9706232754e9ea9e;p=emacs.git Call shutdown/exit methods with params:{}, not null "null" is not a valid JSON value for "params" according to the JSON-RPC specification. * eglot.el (eglot-shutdown): Do the same thing as for "initialized", and use an empty hash table to be serialized to {}. Copyright-paperwork-exempt: yes GitHub-reference: per https://github.com/joaotavora/eglot/issues/315 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 1decb2695fc..1bdca12642d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -595,8 +595,9 @@ SERVER. ." (unwind-protect (progn (setf (eglot--shutdown-requested server) t) - (jsonrpc-request server :shutdown nil :timeout (or timeout 1.5)) - (jsonrpc-notify server :exit nil)) + (jsonrpc-request server :shutdown (make-hash-table) + :timeout (or timeout 1.5)) + (jsonrpc-notify server :exit (make-hash-table))) ;; Now ask jsonrpc.el to shut down the server. (jsonrpc-shutdown server (not preserve-buffers)) (unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))