diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2014-12-31 20:18:19 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2014-12-31 20:26:13 +0100 |
commit | 27b7eacc9c062328d189337e02c2229b4be3e3c7 (patch) | |
tree | 06fcee46eacb3f2ceb47c4ccf2e816aabb82688b /scheme/racket/geiser/user.rkt | |
parent | 0dbd605e631beea9b46f526deda2a7d05928c49f (diff) | |
download | geiser-guile-27b7eacc9c062328d189337e02c2229b4be3e3c7.tar.gz geiser-guile-27b7eacc9c062328d189337e02c2229b4be3e3c7.tar.bz2 |
Racket: displaying graphics in structured objects
By hooking the pretty-printer, as discovered by Greg in issue #49. To
attain nirvana, we would still need (display (list graph)) to work...
Diffstat (limited to 'scheme/racket/geiser/user.rkt')
-rw-r--r-- | scheme/racket/geiser/user.rkt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scheme/racket/geiser/user.rkt b/scheme/racket/geiser/user.rkt index c566309..b936219 100644 --- a/scheme/racket/geiser/user.rkt +++ b/scheme/racket/geiser/user.rkt @@ -126,7 +126,9 @@ (define (install-print-handlers) (for-each install-print-handler (list port-print-handler port-write-handler - port-display-handler))) + port-display-handler)) + (pretty-print-print-hook (make-pretty-print-print-hook)) + (pretty-print-size-hook (make-pretty-print-size-hook))) (define (init-geiser-repl) (compile-enforce-module-constants #f) @@ -143,7 +145,9 @@ (current-error-port out) (current-load/use-compiled (geiser-loader)) (current-prompt-read (geiser-prompt-read geiser-prompt)) - (current-print maybe-print-image)] + (current-print maybe-print-image) + (pretty-print-print-hook (make-pretty-print-print-hook)) + (pretty-print-size-hook (make-pretty-print-size-hook))] (install-print-handlers) (preload-help) (read-eval-print-loop))) |