emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 67d8335 17/69: jrpc.el should know nothing of mod


From: João Távora
Subject: [elpa] externals/eglot 67d8335 17/69: jrpc.el should know nothing of mode-line updates
Date: Fri, 22 Jun 2018 11:54:56 -0400 (EDT)

branch: externals/eglot
commit 67d833598956521c848223304c2ef35fcb6812ca
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    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)."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]