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))))
|
||||
:eval (or eval
|
||||
(fn [expr]
|
||||
(sci/with-bindings {sci/file "<repl>"}
|
||||
(let [ret (eval-form (update sci-ctx
|
||||
:env
|
||||
(fn [env]
|
||||
(swap! env update-in [:namespaces 'clojure.core]
|
||||
assoc
|
||||
'*1 *1
|
||||
'*2 *2
|
||||
'*3 *3
|
||||
'*e *e)
|
||||
env))
|
||||
expr)]
|
||||
(sci/with-bindings {sci/file "<repl>"
|
||||
sci/*1 *1
|
||||
sci/*2 *2
|
||||
sci/*3 *3
|
||||
sci/*e *e}
|
||||
(let [ret (eval-form sci-ctx expr)]
|
||||
ret))))
|
||||
:need-prompt (or need-prompt (fn [] true))
|
||||
:prompt (or prompt #(sio/printf "%s=> " (vars/current-ns-name)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue