1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +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:
Calvin Rose 2020-04-24 22:29:02 -05:00
parent da438a93e0
commit 84974d6c56

View File

@ -2495,13 +2495,14 @@
(fn [f x]
(if (= :dead (fiber/status f))
(do (pp x) (put e '_ @{:value x}))
(put e '_ @{:value x})
(if (e :debug)
(enter-debugger f x)
(do (debug/stacktrace f x) (eflush))))))
(run-context {:env env
:chunks chunks
:expander (fn [x] [pp x])
:on-status (or onsignal (make-onsignal env 1))
:source "repl"}))