mirror of
https://github.com/janet-lang/janet
synced 2024-12-01 20:39:55 +00:00
Make repl printing work from current environment.
Although this "unprotects" output in the repl, people in a repl usually want control, not protection.
This commit is contained in:
parent
da438a93e0
commit
84974d6c56
@ -2495,13 +2495,14 @@
|
|||||||
|
|
||||||
(fn [f x]
|
(fn [f x]
|
||||||
(if (= :dead (fiber/status f))
|
(if (= :dead (fiber/status f))
|
||||||
(do (pp x) (put e '_ @{:value x}))
|
(put e '_ @{:value x})
|
||||||
(if (e :debug)
|
(if (e :debug)
|
||||||
(enter-debugger f x)
|
(enter-debugger f x)
|
||||||
(do (debug/stacktrace f x) (eflush))))))
|
(do (debug/stacktrace f x) (eflush))))))
|
||||||
|
|
||||||
(run-context {:env env
|
(run-context {:env env
|
||||||
:chunks chunks
|
:chunks chunks
|
||||||
|
:expander (fn [x] [pp x])
|
||||||
:on-status (or onsignal (make-onsignal env 1))
|
:on-status (or onsignal (make-onsignal env 1))
|
||||||
:source "repl"}))
|
:source "repl"}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user