]> 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)
committerEshel Yaron <me@eshelyaron.com>
Fri, 22 Dec 2023 07:41:44 +0000 (08:41 +0100)
commita554971117d8dd0876a61a081d6e864802e7a97e
tree64c94629b87878a796576ca7477ddee9aa9c8aa8
parent75dc7e26099c48e2c4bafcd0826523035dfc834a
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.

(cherry picked from commit e0b9944b69ff72923c29756fcfcea9528a3f5069)
lisp/jsonrpc.el
lisp/progmodes/eglot.el
test/lisp/progmodes/eglot-tests.el