From 99cb423db699ec1ed359326b9b6f9892067de5bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 18 May 2018 16:52:19 +0100 Subject: [PATCH] Jrpc.el should know nothing of mode-line updates * eglot.el (eglot--dispatch): METHOD can be a symbol. Call force-mode-line-update here. --- lisp/progmodes/eglot.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4e02c72e3e7..81229a58177 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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)) -- 2.39.2