diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-16 22:12:05 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-16 23:28:34 +0200 |
commit | dd42ab03ba60948ec676e61d97b54167a1787f5b (patch) | |
tree | 639386cce10780256105b0166e282d2e307162d6 /module/calp | |
parent | Better error handling when submitting events. (diff) | |
download | calp-dd42ab03ba60948ec676e61d97b54167a1787f5b.tar.gz calp-dd42ab03ba60948ec676e61d97b54167a1787f5b.tar.xz |
Truncate print for spawned repl.
Having this as the default allows the representation of vcomponents to
not contain a newline. Otherwise accidentaly printing everything was a
sure fire way to hang emacs.
Diffstat (limited to 'module/calp')
-rw-r--r-- | module/calp/repl.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/module/calp/repl.scm b/module/calp/repl.scm index b0281f07..327ee206 100644 --- a/module/calp/repl.scm +++ b/module/calp/repl.scm @@ -4,6 +4,8 @@ (define-module (calp repl) :use-module (system repl server) + :use-module ((system repl common) :select (repl-default-option-set!)) + :use-module ((ice-9 pretty-print) :select (truncated-print)) :use-module (ice-9 regex) :use-module (ice-9 format) :use-module ((calp util hooks) :select (shutdown-hook)) @@ -37,7 +39,12 @@ ;; currently impossible [(IPv6) (error (G_ "How did you get here?"))])) - ;; TODO setup repl environment here + (repl-default-option-set! + 'print + (lambda (repl obj) + (truncated-print obj) + (newline))) + ;; TODO setup repl environment here ) |