Remove uses of lexical-let

This commit is contained in:
Nathaniel Nicandro 2018-01-08 21:43:07 -06:00
parent 326ff15d92
commit 9ba6ad331e
4 changed files with 26 additions and 31 deletions

View file

@ -245,8 +245,7 @@ connected."
(oset channel timer
(run-with-timer
0 (oref channel time-to-dead)
(lexical-let ((identity identity)
(sent nil))
(let ((sent nil))
(lambda (channel)
(let ((sock (oref channel socket)))
(when sent

View file

@ -527,8 +527,7 @@ that if no TIMEOUT is given, `jupyter-default-timeout' is used."
(declare (indent 1))
(setq timeout (or timeout jupyter-default-timeout))
(cl-check-type timeout number)
(lexical-let ((msg nil)
(cb cb))
(let ((msg nil))
(jupyter-add-callback req
msg-type (lambda (m) (setq msg (when (funcall cb m) m))))
(with-timeout (timeout nil)

View file

@ -841,7 +841,6 @@ kernel that the REPL buffer is connected to."
(candidates
(cons
:async
(lexical-let ((arg arg))
(lambda (cb)
(let ((client jupyter-repl-current-client))
(with-jupyter-repl-buffer client
@ -858,14 +857,12 @@ kernel that the REPL buffer is connected to."
;; characters long.
:pos (1- (jupyter-repl-cell-code-position)))
:complete-reply
(apply-partially
(lambda (cb msg)
(lambda (msg)
(cl-destructuring-bind (&key status matches
&allow-other-keys)
(jupyter-message-content msg)
(if (equal status "ok") (funcall cb matches)
(funcall cb '()))))
cb))))))))
(funcall cb '()))))))))))
(sorted t)
(doc-buffer
(let ((msg (jupyter-wait-until-received :inspect-reply

View file

@ -180,7 +180,7 @@ testing the callback functionality of a
(setq ran-callbacks (nreverse ran-callbacks))
(should (equal ran-callbacks '(1 1 1 2 2 2)))))
(ert-info ("Multiple callbacks for a single message type")
(lexical-let* ((ran-callbacks nil)
(let* ((ran-callbacks nil)
(req (jupyter-execute-request client :code "foo")))
(jupyter-add-callback req
:execute-reply (lambda (_msg) (push 1 ran-callbacks)))