branch: externals/eglot commit d87f4bf8b788756e61d4cde7a8d0099839525da2 Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
jsonrpc--log-event should also be private * eglot-tests.el (eglot--sniffing): Use jsonrpc--log-event. * jsonrpc.el (jsonrpc-connection-send) (jsonrpc--connection-receive, jsonrpc--debug): Use jsonrpc--log-event. (jsonrpc--log-event): Rename from jsonrpc-log-event. --- eglot-tests.el | 4 ++-- jsonrpc.el | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eglot-tests.el b/eglot-tests.el index 40970a7..56ec980 100644 --- a/eglot-tests.el +++ b/eglot-tests.el @@ -124,7 +124,7 @@ client-notifications client-replies)) (advice-add - #'jsonrpc-log-event :before + #'jsonrpc--log-event :before (lambda (_proc message &optional type) (cl-destructuring-bind (&key method id _error &allow-other-keys) message @@ -148,7 +148,7 @@ `(push message ,client-replies))))))))) '((name . ,log-event-ad-sym))) ,@body) - (advice-remove #'jsonrpc-log-event ',log-event-ad-sym)))) + (advice-remove #'jsonrpc--log-event ',log-event-ad-sym)))) (cl-defmacro eglot--wait-for ((events-sym &optional (timeout 1) message) args &body body) "Spin until FN match in EVENTS-SYM, flush events after it. diff --git a/jsonrpc.el b/jsonrpc.el index 0537699..f5808fc 100644 --- a/jsonrpc.el +++ b/jsonrpc.el @@ -266,7 +266,7 @@ connection object, called when the process dies .") (format "Content-Length: %d\r\n\r\n%s" (string-bytes json) json)) - (jsonrpc-log-event connection message 'client))) + (jsonrpc--log-event connection message 'client))) (cl-defmethod jsonrpc-process-type ((conn jsonrpc-process-connection)) "Return the process-type of JSONRPC connection CONN" @@ -520,7 +520,7 @@ DEFERRED is passed to `jsonrpc-async-request', which see." (cl-destructuring-bind (&key method id error params result _jsonrpc) message (let (continuations) - (jsonrpc-log-event connection message 'server) + (jsonrpc--log-event connection message 'server) (setf (jsonrpc-last-error connection) error) (cond (;; A remote request @@ -636,7 +636,7 @@ TIMEOUT is nil)." (defun jsonrpc--debug (server format &rest args) "Debug message for SERVER with FORMAT and ARGS." - (jsonrpc-log-event + (jsonrpc--log-event server (if (stringp format)`(:message ,(format format args)) format))) (defun jsonrpc--warn (format &rest args) @@ -647,7 +647,7 @@ TIMEOUT is nil)." (apply #'format format args) :warning))) -(defun jsonrpc-log-event (connection message &optional type) +(defun jsonrpc--log-event (connection message &optional type) "Log an jsonrpc-related event. CONNECTION is the current connection. MESSAGE is a JSON-like plist. TYPE is a symbol saying if this is a client or server