summaryrefslogtreecommitdiff
path: root/lisp/jsonrpc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/jsonrpc.el')
-rw-r--r--lisp/jsonrpc.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el
index 84d0ef9179b..90833e1c1d7 100644
--- a/lisp/jsonrpc.el
+++ b/lisp/jsonrpc.el
@@ -4,7 +4,7 @@
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: processes, languages, extensions
-;; Version: 1.0.14
+;; Version: 1.0.15
;; Package-Requires: ((emacs "25.2"))
;; This is a GNU ELPA :core package. Avoid functionality that is not
@@ -277,7 +277,7 @@ the function is waiting, then it exits immediately, returning
CANCEL-ON-INPUT-RETVAL. Any future replies (normal or error) are
ignored."
(let* ((tag (cl-gensym "jsonrpc-request-catch-tag")) id-and-timer
- cancelled
+ canceled
(retval
(unwind-protect
(catch tag
@@ -287,26 +287,26 @@ ignored."
#'jsonrpc--async-request-1
connection method params
:success-fn (lambda (result)
- (unless cancelled
+ (unless canceled
(throw tag `(done ,result))))
:error-fn
(jsonrpc-lambda
(&key code message data)
- (unless cancelled
+ (unless canceled
(throw tag `(error (jsonrpc-error-code . ,code)
(jsonrpc-error-message . ,message)
(jsonrpc-error-data . ,data)))))
:timeout-fn
(lambda ()
- (unless cancelled
+ (unless canceled
(throw tag '(error (jsonrpc-error-message . "Timed out")))))
`(,@(when deferred `(:deferred ,deferred))
,@(when timeout `(:timeout ,timeout)))))
(cond (cancel-on-input
(unwind-protect
(let ((inhibit-quit t)) (while (sit-for 30)))
- (setq cancelled t))
- `(cancelled ,cancel-on-input-retval))
+ (setq canceled t))
+ `(canceled ,cancel-on-input-retval))
(t (while t (accept-process-output nil 30)))))
;; In normal operation, cancellation is handled by the
;; timeout function and response filter, but we still have
@@ -698,7 +698,9 @@ TIMEOUT is nil)."
(defun jsonrpc--debug (server format &rest args)
"Debug message for SERVER with FORMAT and ARGS."
(jsonrpc--log-event
- server (if (stringp format)`(:message ,(format format args)) format)))
+ server (if (stringp format)
+ `(:message ,(apply #'format format args))
+ format)))
(defun jsonrpc--warn (format &rest args)
"Warning message with FORMAT and ARGS."