]> git.eshelyaron.com Git - emacs.git/commitdiff
Send shutdown and exit messages without arguments
authorFelicián Németh <felician.nemeth@gmail.com>
Thu, 16 Apr 2020 07:38:31 +0000 (09:38 +0200)
committerFelicián Németh <felician.nemeth@gmail.com>
Thu, 16 Apr 2020 07:38:31 +0000 (09:38 +0200)
Fix regression introduced in 70e6157b (https://github.com/joaotavora/eglot/issues/315).  According to the
LSP specification the exit notification and the shutdown request
shouldn't have arguments ("params: void").  Note that jsonrpc.el
send nil as null on the wire.

* eglot.el (eglot-shutdown): Change back the arguments of
:shutdown and :exit to nil.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/430

lisp/progmodes/eglot.el

index fe06e0c9ada3dcc5a94088631fc2737ea7680c8e..3149cd5cc01e009785a5e36616751752bfe48d2a 100644 (file)
@@ -598,9 +598,8 @@ SERVER.  ."
   (unwind-protect
       (progn
         (setf (eglot--shutdown-requested server) t)
-        (jsonrpc-request server :shutdown eglot--{}
-                         :timeout (or timeout 1.5))
-        (jsonrpc-notify server :exit eglot--{}))
+        (jsonrpc-request server :shutdown nil :timeout (or timeout 1.5))
+        (jsonrpc-notify server :exit nil))
     ;; Now ask jsonrpc.el to shut down the server.
     (jsonrpc-shutdown server (not preserve-buffers))
     (unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))