Use REPL variables from sci
This commit is contained in:
parent
9cdd81c37b
commit
e65457cf29
2 changed files with 7 additions and 13 deletions
2
sci
2
sci
|
|
@ -1 +1 @@
|
||||||
Subproject commit af30be059583c498b5deb65647131ae7b78f5669
|
Subproject commit f1b35e0a0de4335fd0a6af2cea10bfa04919161e
|
||||||
|
|
@ -62,18 +62,12 @@
|
||||||
v))))
|
v))))
|
||||||
:eval (or eval
|
:eval (or eval
|
||||||
(fn [expr]
|
(fn [expr]
|
||||||
(sci/with-bindings {sci/file "<repl>"}
|
(sci/with-bindings {sci/file "<repl>"
|
||||||
(let [ret (eval-form (update sci-ctx
|
sci/*1 *1
|
||||||
:env
|
sci/*2 *2
|
||||||
(fn [env]
|
sci/*3 *3
|
||||||
(swap! env update-in [:namespaces 'clojure.core]
|
sci/*e *e}
|
||||||
assoc
|
(let [ret (eval-form sci-ctx expr)]
|
||||||
'*1 *1
|
|
||||||
'*2 *2
|
|
||||||
'*3 *3
|
|
||||||
'*e *e)
|
|
||||||
env))
|
|
||||||
expr)]
|
|
||||||
ret))))
|
ret))))
|
||||||
:need-prompt (or need-prompt (fn [] true))
|
:need-prompt (or need-prompt (fn [] true))
|
||||||
:prompt (or prompt #(sio/printf "%s=> " (vars/current-ns-name)))
|
:prompt (or prompt #(sio/printf "%s=> " (vars/current-ns-name)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue