diff options
author | João Távora <joaotavora@gmail.com> | 2018-07-03 08:21:42 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2018-07-03 08:21:56 +0100 |
commit | 4ee502ca9db022ef85c736888ec6d6b471e0332a (patch) | |
tree | 80b7a3f2b7e7d99745e5af9148218502d3824618 /test/lisp/jsonrpc-tests.el | |
parent | 40db29fc5562d416a2af6c2a45b9f3f5e6a302db (diff) | |
download | emacs-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 'test/lisp/jsonrpc-tests.el')
-rw-r--r-- | test/lisp/jsonrpc-tests.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lisp/jsonrpc-tests.el b/test/lisp/jsonrpc-tests.el index 16986eb46f6..1a84c30e33d 100644 --- a/test/lisp/jsonrpc-tests.el +++ b/test/lisp/jsonrpc-tests.el @@ -48,7 +48,11 @@ (setq listen-server (make-network-process :name "Emacs RPC server" :server t :host "localhost" - :service 44444 + :service (if (version<= emacs-version "26.1") + 44444 + ;; 26.1 can automatically find ports if + ;; one passes 0 here. + 0) :log (lambda (listen-server client _message) (push (make-instance |