diff --git a/scheme/ikarus.boot.orig b/scheme/ikarus.boot.orig index 25ee9c5..24a6365 100644 Binary files a/scheme/ikarus.boot.orig and b/scheme/ikarus.boot.orig differ diff --git a/scheme/ikarus.pretty-print.ss b/scheme/ikarus.pretty-print.ss index 0b9c969..d7ce48b 100644 --- a/scheme/ikarus.pretty-print.ss +++ b/scheme/ikarus.pretty-print.ss @@ -15,10 +15,10 @@ (library (ikarus pretty-print) - (export pretty-print) + (export pretty-print pretty-width) (import (rnrs hashtables) - (except (ikarus) pretty-print)) + (except (ikarus) pretty-print pretty-width)) (define (map1ltr f ls) ;;; ltr so that gensym counts get assigned properly (cond @@ -26,7 +26,14 @@ [else (let ([a (f (car ls))]) (cons a (map1ltr f (cdr ls))))])) - (define (pretty-width) 80) + + (define pretty-width + (make-parameter 60 + (lambda (x) + (unless (and (exact? x) (integer? x) (> x 0)) + (error 'pretty-width "invalid argument" x)) + x))) + (define (pretty-indent) 1) (define-struct cbox (length boxes)) (define-struct pbox (length ls last)) diff --git a/scheme/makefile.ss b/scheme/makefile.ss index 95c7a64..39a5eac 100755 --- a/scheme/makefile.ss +++ b/scheme/makefile.ss @@ -344,6 +344,7 @@ [read-token i] [unread-char i] [printf i] + [fprintf i] [format i] [comment-handler i] [print-gensym i symbols] @@ -1257,6 +1258,7 @@ [set-symbol-value! i symbols $boot] [eval-core $boot] [pretty-print i $boot] + [pretty-width i] [module i cm] [syntax-dispatch ] [syntax-error i sc] diff --git a/scheme/psyntax.expander.ss b/scheme/psyntax.expander.ss index 44581f2..88fe885 100644 --- a/scheme/psyntax.expander.ss +++ b/scheme/psyntax.expander.ss @@ -3202,7 +3202,15 @@ (lambda (ls) (syntax-match ls () ((ls ...) - (map (lambda (x) (make-stx (gensym 't) top-mark* '())) ls)) + (map (lambda (x) + (make-stx + (let ([x (syntax->datum x)]) + (cond + [(or (symbol? x) (string? x)) + (gensym x)] + [else (gensym 't)])) + top-mark* '())) + ls)) (_ (error 'generate-temporaries "not a list")))))