[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 99ca690 17/24: Simpify eglot--server-receive
From: |
João Távora |
Subject: |
[elpa] externals/eglot 99ca690 17/24: Simpify eglot--server-receive |
Date: |
Sat, 26 May 2018 14:31:16 -0400 (EDT) |
branch: externals/eglot
commit 99ca690d9749f43425c5e709fd8697b1f9fedef5
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Simpify eglot--server-receive
* eglot.el (eglot--obj): Cleanup whitespace.
(eglot--server-receive): Simplify.
---
eglot.el | 45 ++++++++++++++++++++++-----------------------
1 file changed, 22 insertions(+), 23 deletions(-)
diff --git a/eglot.el b/eglot.el
index 8fe24ed..51bcc8b 100644
--- a/eglot.el
+++ b/eglot.el
@@ -115,7 +115,7 @@ lasted more than that many seconds."
;;; API (WORK-IN-PROGRESS!)
;;;
-(defmacro eglot--obj (&rest what)
+(defmacro eglot--obj (&rest what)
"Make WHAT a JSON object suitable for `json-encode'."
(declare (debug (&rest form)))
;; FIXME: not really API. Should it be?
@@ -582,29 +582,28 @@ originated."
(gethash id (eglot--pending-continuations
server)))))
(eglot--log-event server message 'server)
(when error (setf (eglot--status server) `(,error t)))
- (unless (or (null method)
- (keywordp method))
+ (unless (or (null method) (keywordp method))
(setq method (intern (format ":%s" method))))
- (cond ((and method id)
- (condition-case-unless-debug _err
- (apply #'eglot-handle-request server id method params)
- (cl-no-applicable-method
- (eglot--reply server id
- :error `(:code -32601 :message "Method
unimplemented")))))
- (method
- (condition-case-unless-debug _err
- (apply #'eglot-handle-notification server method params)
- (cl-no-applicable-method
- (eglot--log-event
- server '(:error `(:message "Notification unimplemented"))))))
- (continuations
- (cancel-timer (cl-third continuations))
- (remhash id (eglot--pending-continuations server))
- (if error
- (funcall (cl-second continuations) error)
- (funcall (cl-first continuations) result)))
- (id
- (eglot--warn "Ooops no continuation for id %s" id)))
+ (cond
+ (method
+ (condition-case-unless-debug _err
+ (if id
+ (apply #'eglot-handle-request server id method params)
+ (apply #'eglot-handle-notification server method params))
+ (cl-no-applicable-method
+ (if id
+ (eglot--reply
+ server id :error `(:code -32601 :message "Method
unimplemented"))
+ (eglot--log-event
+ server '(:error `(:message "Notification unimplemented")))))))
+ (continuations
+ (cancel-timer (cl-third continuations))
+ (remhash id (eglot--pending-continuations server))
+ (if error
+ (funcall (cl-second continuations) error)
+ (funcall (cl-first continuations) result)))
+ (id
+ (eglot--warn "Ooops no continuation for id %s" id)))
(eglot--call-deferred server)
(force-mode-line-update t))))
- [elpa] externals/eglot 9c87771 12/24: Introduce eglot--debug for unimportant messages, (continued)
- [elpa] externals/eglot 9c87771 12/24: Introduce eglot--debug for unimportant messages, João Távora, 2018/05/26
- [elpa] externals/eglot 8d4c2c3 13/24: Demote unvisited diagnostics logging to debug level, João Távora, 2018/05/26
- [elpa] externals/eglot 85c5353 11/24: Add cquery support for C/C++ projects, João Távora, 2018/05/26
- [elpa] externals/eglot d40a458 14/24: Log debug messages through eglot--debug, João Távora, 2018/05/26
- [elpa] externals/eglot 17a3257 03/24: Do Rust's RLS hack properly with new class-based API, João Távora, 2018/05/26
- [elpa] externals/eglot 3aa2958 06/24: Add a complex RLS test, João Távora, 2018/05/26
- [elpa] externals/eglot 07078da 08/24: Rework eglot-tests.el for better debuggability, João Távora, 2018/05/26
- [elpa] externals/eglot 0462130 15/24: New RLS tests, João Távora, 2018/05/26
- [elpa] externals/eglot e1d7ff3 09/24: Disable file-watching tests on Travis, João Távora, 2018/05/26
- [elpa] externals/eglot c8e7ab0 16/24: Don't rely on Flymake's idle timer for textDocument/didChange, João Távora, 2018/05/26
- [elpa] externals/eglot 99ca690 17/24: Simpify eglot--server-receive,
João Távora <=
- [elpa] externals/eglot 1b5ed29 21/24: Really ensure eglot--shutdown deletes a process completely, João Távora, 2018/05/26
- [elpa] externals/eglot 897cbc3 24/24: * eglot.el (Version): Bump to 0.5, João Távora, 2018/05/26
- [elpa] externals/eglot ec10de2 23/24: Another unstable test on Travis, João Távora, 2018/05/26
- [elpa] externals/eglot d0fb9d2 22/24: Merge branch 'cquery-support' into master, João Távora, 2018/05/26
- [elpa] externals/eglot 97db670 19/24: Get rid of eglot--obj, an uninteresting abstraction, João Távora, 2018/05/26
- [elpa] externals/eglot 5e3804b 20/24: Add a new test., João Távora, 2018/05/26
- [elpa] externals/eglot 94c008d 18/24: Cleanup deferred request mechanism with a readable log, João Távora, 2018/05/26
- [elpa] externals/eglot 18176f3 02/24: Use an EIEIO class to represent a server., João Távora, 2018/05/26
- [elpa] externals/eglot eccb7d1 10/24: Merge branch 'use-eieio-server-defclass', João Távora, 2018/05/26