diff --git a/collects/framework/private/color.rkt b/collects/framework/private/color.rkt index b64be91b8f..87ad45f593 100644 --- a/collects/framework/private/color.rkt +++ b/collects/framework/private/color.rkt @@ -30,7 +30,7 @@ added get-regions (init-depend framework:text^ framework:mode^) (define (should-color-type? type) - (not (memq type '(white-space no-color)))) + (not (memq type '(no-color)))) (define (make-data type mode backup-delta) (if (zero? backup-delta) diff --git a/collects/framework/private/racket.rkt b/collects/framework/private/racket.rkt index dc5e36c124..92f1af6683 100644 --- a/collects/framework/private/racket.rkt +++ b/collects/framework/private/racket.rkt @@ -328,7 +328,10 @@ [(sexp-comment) 'comment] [else sym])) (define sn-hash (make-hasheq)) -(define (short-sym->style-name sym) +(define (short-sym->style-name _sym) + (define sym (if (eq? _sym 'white-space) + 'parenthesis + _sym)) (hash-ref sn-hash sym (λ () (let ([s (format "framework:syntax-color:scheme:~a" diff --git a/collects/racket/snip/private/snip.rkt b/collects/racket/snip/private/snip.rkt index 908784dc45..0cb5b1bd0b 100644 --- a/collects/racket/snip/private/snip.rkt +++ b/collects/racket/snip/private/snip.rkt @@ -405,7 +405,7 @@ (set! s-flags (add-flag (add-flag s-flags IS-TEXT) CAN-APPEND)) - (let ([len (max 20 (* 2 (min len 5000)))]) + (let ([len (max 8 (* 2 (min len 5000)))]) (set! s-buffer (make-string len))) (set! s-snipclass the-string-snip-class) diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index bd0b6ba617..f092d88d52 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -5,6 +5,10 @@ . DrRacket's toolbar buttons now have numbers associated with them to control what order they appear in. + . The framework's color:text%'s token-sym->style init argument (also + the same as the color:text%'s start-colorer method's argument of + the same name) is a function that now might be passed 'white-space. + ------------------------------ Version 5.2.1 ------------------------------