diff options
| author | João Távora | 2018-07-03 08:21:42 +0100 |
|---|---|---|
| committer | João Távora | 2018-07-03 08:21:56 +0100 |
| commit | 4ee502ca9db022ef85c736888ec6d6b471e0332a (patch) | |
| tree | 80b7a3f2b7e7d99745e5af9148218502d3824618 /test | |
| parent | 40db29fc5562d416a2af6c2a45b9f3f5e6a302db (diff) | |
| download | emacs-4ee502ca9db022ef85c736888ec6d6b471e0332a.tar.gz emacs-4ee502ca9db022ef85c736888ec6d6b471e0332a.zip | |
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')
| -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 @@ | |||
| 48 | (setq listen-server | 48 | (setq listen-server |
| 49 | (make-network-process | 49 | (make-network-process |
| 50 | :name "Emacs RPC server" :server t :host "localhost" | 50 | :name "Emacs RPC server" :server t :host "localhost" |
| 51 | :service 44444 | 51 | :service (if (version<= emacs-version "26.1") |
| 52 | 44444 | ||
| 53 | ;; 26.1 can automatically find ports if | ||
| 54 | ;; one passes 0 here. | ||
| 55 | 0) | ||
| 52 | :log (lambda (listen-server client _message) | 56 | :log (lambda (listen-server client _message) |
| 53 | (push | 57 | (push |
| 54 | (make-instance | 58 | (make-instance |