summaryrefslogtreecommitdiff
path: root/lisp/jsonrpc.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2018-07-03 08:21:42 +0100
committerJoão Távora <joaotavora@gmail.com>2018-07-03 08:21:56 +0100
commit4ee502ca9db022ef85c736888ec6d6b471e0332a (patch)
tree80b7a3f2b7e7d99745e5af9148218502d3824618 /lisp/jsonrpc.el
parent40db29fc5562d416a2af6c2a45b9f3f5e6a302db (diff)
downloademacs-4ee502ca9db022ef85c736888ec6d6b471e0332a.tar.gz
Adjust previous jsonrpc change
(nth 2) is probably a better alternative to caddr, and in Emacs 26.1 we can pass 0 as :service to automatically find an available port. * lisp/jsonrpc.el (jsonrpc--call-deferred): Use cl-caddr. * test/lisp/jsonrpc-tests.el (jsonrpc--call-with-emacsrpc-fixture): Pass 0 as :service to when making the listen server.
Diffstat (limited to 'lisp/jsonrpc.el')
-rw-r--r--lisp/jsonrpc.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el
index add2285bbe4..b2ccea5c143 100644
--- a/lisp/jsonrpc.el
+++ b/lisp/jsonrpc.el
@@ -5,11 +5,11 @@
;; Author: João Távora <joaotavora@gmail.com>
;; Maintainer: João Távora <joaotavora@gmail.com>
;; Keywords: processes, languages, extensions
-;; Package-Requires: ((emacs "25.1"))
+;; Package-Requires: ((emacs "25.2"))
;; Version: 1.0.0
;; This is an Elpa :core package. Don't use functionality that is not
-;; compatible with Emacs 25.1.
+;; compatible with Emacs 25.2.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -437,8 +437,7 @@ connection object, called when the process dies .")
"Call CONNECTION's deferred actions, who may again defer themselves."
(when-let ((actions (hash-table-values (jsonrpc--deferred-actions connection))))
(jsonrpc--debug connection `(:maybe-run-deferred
- ,(mapcar (lambda (action) (car (cdr (cdr action))))
- actions)))
+ ,(mapcar (apply-partially #'nth 2) actions)))
(mapc #'funcall (mapcar #'car actions))))
(defun jsonrpc--process-sentinel (proc change)