From: João Távora Date: Fri, 18 May 2018 15:52:19 +0000 (+0100) Subject: Jrpc.el should know nothing of mode-line updates X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~489^2~18 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=99cb423db699ec1ed359326b9b6f9892067de5bc;p=emacs.git Jrpc.el should know nothing of mode-line updates * eglot.el (eglot--dispatch): METHOD can be a symbol. Call force-mode-line-update here. --- 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))