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 /lisp | |
| 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 'lisp')
| -rw-r--r-- | lisp/jsonrpc.el | 7 |
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 @@ | |||
| 5 | ;; Author: João Távora <joaotavora@gmail.com> | 5 | ;; Author: João Távora <joaotavora@gmail.com> |
| 6 | ;; Maintainer: João Távora <joaotavora@gmail.com> | 6 | ;; Maintainer: João Távora <joaotavora@gmail.com> |
| 7 | ;; Keywords: processes, languages, extensions | 7 | ;; Keywords: processes, languages, extensions |
| 8 | ;; Package-Requires: ((emacs "25.1")) | 8 | ;; Package-Requires: ((emacs "25.2")) |
| 9 | ;; Version: 1.0.0 | 9 | ;; Version: 1.0.0 |
| 10 | 10 | ||
| 11 | ;; This is an Elpa :core package. Don't use functionality that is not | 11 | ;; This is an Elpa :core package. Don't use functionality that is not |
| 12 | ;; compatible with Emacs 25.1. | 12 | ;; compatible with Emacs 25.2. |
| 13 | 13 | ||
| 14 | ;; This program is free software; you can redistribute it and/or modify | 14 | ;; This program is free software; you can redistribute it and/or modify |
| 15 | ;; it under the terms of the GNU General Public License as published by | 15 | ;; it under the terms of the GNU General Public License as published by |
| @@ -437,8 +437,7 @@ connection object, called when the process dies .") | |||
| 437 | "Call CONNECTION's deferred actions, who may again defer themselves." | 437 | "Call CONNECTION's deferred actions, who may again defer themselves." |
| 438 | (when-let ((actions (hash-table-values (jsonrpc--deferred-actions connection)))) | 438 | (when-let ((actions (hash-table-values (jsonrpc--deferred-actions connection)))) |
| 439 | (jsonrpc--debug connection `(:maybe-run-deferred | 439 | (jsonrpc--debug connection `(:maybe-run-deferred |
| 440 | ,(mapcar (lambda (action) (car (cdr (cdr action)))) | 440 | ,(mapcar (apply-partially #'nth 2) actions))) |
| 441 | actions))) | ||
| 442 | (mapc #'funcall (mapcar #'car actions)))) | 441 | (mapc #'funcall (mapcar #'car actions)))) |
| 443 | 442 | ||
| 444 | (defun jsonrpc--process-sentinel (proc change) | 443 | (defun jsonrpc--process-sentinel (proc change) |