summaryrefslogtreecommitdiff
path: root/scheme/chicken/geiser
diff options
context:
space:
mode:
authorDan Leslie <dan@ironoxide.ca>2018-11-12 23:48:43 -0800
committerDan Leslie <dan@ironoxide.ca>2018-11-12 23:48:43 -0800
commit55f404607c503d8fe7d0b187f064e29667ac1496 (patch)
treec3150fea3af3a42e74baa8c30626d493480a8629 /scheme/chicken/geiser
parentfd41ea8fc8d6d49782fb79d5971cdecb04cc1115 (diff)
downloadgeiser-guile-55f404607c503d8fe7d0b187f064e29667ac1496.tar.gz
geiser-guile-55f404607c503d8fe7d0b187f064e29667ac1496.tar.bz2
Fixes autodoc in Chicken, #258
Diffstat (limited to 'scheme/chicken/geiser')
-rw-r--r--scheme/chicken/geiser/chicken5.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/scheme/chicken/geiser/chicken5.scm b/scheme/chicken/geiser/chicken5.scm
index 6c8ceae..5409058 100644
--- a/scheme/chicken/geiser/chicken5.scm
+++ b/scheme/chicken/geiser/chicken5.scm
@@ -142,11 +142,18 @@
(newline)))
(define (eval* str)
- (handle-exceptions exn #f
- (with-all-output-to-string
- (eval
- (with-input-from-string (->string str)
- (lambda () (read)))))))
+ (cond
+ ((string? str)
+ (handle-exceptions exn
+ (with-all-output-to-string (write-exception exn))
+ (eval
+ (with-input-from-string str
+ (lambda () (read))))))
+ ((symbol? str)
+ (handle-exceptions exn
+ (with-all-output-to-string (write-exception exn))
+ (eval str)))
+ (else (eval* (->string str)))))
(define (fmt node)
(let* ((mod (cadr node))