Function: jsonrpc--remove
jsonrpc--remove is a byte-compiled function defined in jsonrpc.el.gz.
Signature
(jsonrpc--remove CONN ID &optional DEFERRED-SPEC)
Documentation
Cancel CONN's continuations for ID, including its timer, if it exists.
Also cancel "deferred actions" if DEFERRED-SPEC. Return the full continuation (ID SUCCESS-FN ERROR-FN TIMER)
Source Code
;; Defined in /usr/src/emacs/lisp/jsonrpc.el.gz
(defun jsonrpc--remove (conn id &optional deferred-spec)
"Cancel CONN's continuations for ID, including its timer, if it exists.
Also cancel \"deferred actions\" if DEFERRED-SPEC.
Return the full continuation (ID SUCCESS-FN ERROR-FN TIMER)"
(with-slots ((conts -continuations) (defs -deferred-actions)) conn
(if deferred-spec (remhash deferred-spec defs))
(when-let* ((ass (assq id conts)))
(cl-destructuring-bind (_ _ _ _ timer) ass
(when timer (cancel-timer timer)))
(setf conts (delete ass conts))
ass)))