branch: externals/eglot
commit 61d1276db33a33e7caa006268300b226b493e33a
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
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