emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 61d1276 66/69: Fix another bug in jsonrpc-connect


From: João Távora
Subject: [elpa] externals/eglot 61d1276 66/69: Fix another bug in jsonrpc-connection-send
Date: Fri, 22 Jun 2018 11:55:05 -0400 (EDT)

branch: externals/eglot
commit 61d1276db33a33e7caa006268300b226b493e33a
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Fix another bug in jsonrpc-connection-send
    
    * jsonrpc.el (jsonrpc-connection-send): Only send method if method
    supplied.
---
 jsonrpc.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/jsonrpc.el b/jsonrpc.el
index caf46af..ef33a38 100644
--- a/jsonrpc.el
+++ b/jsonrpc.el
@@ -431,10 +431,10 @@ connection object, called when the process dies .")
                                        _error
                                        _partial)
   "Send MESSAGE, a JSON object, to CONNECTION."
-  (plist-put args :method
-             (cond ((keywordp method) (substring (symbol-name method) 1))
-                   ((and method (symbolp method)) (symbol-name method))
-                   (t method)))
+  (when method
+    (plist-put args :method
+               (cond ((keywordp method) (substring (symbol-name method) 1))
+                     ((and method (symbolp method)) (symbol-name method)))))
   (let* ( (message `(:jsonrpc "2.0" ,@args))
           (json (jsonrpc--json-encode message))
           (headers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]