]> git.eshelyaron.com Git - emacs.git/commit
Simpler callback protocol for jsonrpc parameters and results
authorJoão Távora <joaotavora@gmail.com>
Wed, 16 May 2018 22:39:12 +0000 (23:39 +0100)
committerJoão Távora <joaotavora@gmail.com>
Wed, 16 May 2018 22:39:12 +0000 (23:39 +0100)
commita6046e9efd71e0efabe487686a4f8c08de76d78d
treec36f603b7a662e16af11b8dfb0f7b907526750ab
parent8bbd2ba28d0774c3d2547c35e9d34d184d90bdc4
Simpler callback protocol for jsonrpc parameters and results

Instead of introspecting the :params or :result object to discover if
an object is present, and changing the Elisp function call type
(funcall vs apply) accordingly, alway funcall. It's up to the
application to destructure if it wishes. jrpc-lambda can help with
that and keep the application code simple.

* eglot.el (eglot--on-shutdown): Fix indentation.
(eglot--dispatch): Simplify.
(xref-backend-identifier-completion-table)
(xref-backend-definitions, xref-backend-references)
(xref-backend-apropos, eglot-completion-at-point)
(eglot-eldoc-function, eglot-imenu, eglot--apply-text-edits):
Don't use jrpc-mapply.

* jrpc.el (jrpc--process-receive): Allow only keys defined in
JSONRPC2.0
(jrpc--process-receive): Don't overload function call type based
on remote response.
(jrpc-lambda): Return a unary lambda.
(jrpc-request): Simplify.
(jrpc-mapply): Remove.
lisp/progmodes/eglot.el