branch: externals/eglot commit 67d833598956521c848223304c2ef35fcb6812ca Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
jrpc.el should know nothing of mode-line updates * eglot.el (eglot--dispatch): METHOD can be a symbol. Call force-mode-line-update here. --- eglot.el | 5 +++-- jrpc.el | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eglot.el b/eglot.el index 4e02c72..81229a5 100644 --- a/eglot.el +++ b/eglot.el @@ -317,11 +317,12 @@ INTERACTIVE is t if called interactively." (defun eglot--dispatch (proc method id params) "Dispatcher passed to `jrpc-connect'. Builds a function from METHOD, passes it PROC, ID and PARAMS." - (let* ((handler-sym (intern (concat "eglot--server-" method)))) + (let* ((handler-sym (intern (format "eglot--server-%s" method)))) (if (functionp handler-sym) ;; FIXME: fails if params is array, not object (apply handler-sym proc (append params (if id `(:id ,id)))) (jrpc-reply proc id - :error (jrpc-obj :code -32601 :message "Unimplemented"))))) + :error (jrpc-obj :code -32601 :message "Unimplemented"))) + (force-mode-line-update t))) (defun eglot--connect (project managed-major-mode name contact) (let* ((contact (if (functionp contact) (funcall contact) contact)) diff --git a/jrpc.el b/jrpc.el index bb4fe28..c974fd9 100644 --- a/jrpc.el +++ b/jrpc.el @@ -452,8 +452,7 @@ is a symbol saying if this is a client or server originated." (funcall (nth 0 continuations) result))) (id (jrpc-warn "No continuation for id %s" id))) - (jrpc--call-deferred proc) - (force-mode-line-update t))) + (jrpc--call-deferred proc))) (defun jrpc--process-send (proc message) "Send MESSAGE to PROC (ID is optional)."