]> git.eshelyaron.com Git - emacs.git/commit
Jsonrpc: overhaul logging mechanics
authorJoão Távora <joaotavora@gmail.com>
Thu, 21 Dec 2023 20:49:02 +0000 (14:49 -0600)
committerJoão Távora <joaotavora@gmail.com>
Fri, 22 Dec 2023 00:29:50 +0000 (18:29 -0600)
commite0b9944b69ff72923c29756fcfcea9528a3f5069
tree611ed1b1188d22aa2a7701b2994684aa4c1b89c5
parent4adc67c59dedcea89116aae0e054ea1212dcca7a
Jsonrpc: overhaul logging mechanics

* lisp/jsonrpc.el (jsonrpc-connection): Rework.
(initialize-instance :after jsonrpc-connection): New method.
(slot-missing jsonrpc-connection :events-buffer-scrollback-size oset):
New hack.
(jsonrpc-connection-receive): Rework.
(initialize-instance :after jsonrpc-process-connection): Rework
from non-after version.
(jsonrpc-connection-send)
(jsonrpc--call-deferred)
(jsonrpc--process-sentinel)
(jsonrpc--async-request-1, jsonrpc--debug, jsonrpc--log-event)
(jsonrpc--forwarding-buffer): Rework.
(jsonrpc--run-event-hook): New helper.
(jsonrpc-event-hook): New hook.

* lisp/progmodes/eglot.el (eglot-lsp-server): Fix project slot
initform.
(eglot--connect): Use new jsonrpc-connection initarg.

* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Use
jsonrpc-event-hook.
(eglot-test-basic-completions): Fix test.
lisp/jsonrpc.el
lisp/progmodes/eglot.el
test/lisp/progmodes/eglot-tests.el