Skip to content

Commit

Permalink
Revert some formatting changes
Browse files Browse the repository at this point in the history
See discussion threads in #678.
  • Loading branch information
jackfirth authored Sep 13, 2024
1 parent 2d55382 commit b0daea2
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions drracket/drracket/private/language.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -348,25 +348,27 @@
;; simple-module-based-language-render-value/format : TST settings port (union #f (snip% -> void)) (union 'infinity number) -> void
(define (simple-module-based-language-render-value/format value settings port width)
(let-values ([(converted-value write?)
(call-with-values (lambda ()
(simple-module-based-language-convert-value value settings))
(case-lambda
[(converted-value) (values converted-value #t)]
[(converted-value write?) (values converted-value write?)]))])
(call-with-values
(lambda ()
(simple-module-based-language-convert-value value settings))
(case-lambda
[(converted-value) (values converted-value #t)]
[(converted-value write?) (values converted-value write?)]))])
(define pretty-out (if write? pretty-write pretty-print))
(setup-printing-parameters (λ ()
(cond
[(simple-settings-insert-newlines settings)
(if (number? width)
(parameterize ([pretty-print-columns width])
(pretty-out converted-value port))
(pretty-out converted-value port))]
[else
(parameterize ([pretty-print-columns 'infinity])
(pretty-out converted-value port))
(newline port)]))
settings
width)))
(setup-printing-parameters
(λ ()
(cond
[(simple-settings-insert-newlines settings)
(if (number? width)
(parameterize ([pretty-print-columns width])
(pretty-out converted-value port))
(pretty-out converted-value port))]
[else
(parameterize ([pretty-print-columns 'infinity])
(pretty-out converted-value port))
(newline port)]))
settings
width)))

(define default-pretty-print-current-style-table (pretty-print-current-style-table))

Expand Down Expand Up @@ -744,7 +746,9 @@
(create-executable-gui parent
program-filename
#t
(if (boolean? mred-launcher) (if mred-launcher 'mred 'mzscheme) #t)))
(if (boolean? mred-launcher)
(if mred-launcher 'mred 'mzscheme)
#t)))
(when executable-specs
(let* ([type (car executable-specs)]
[base (cadr executable-specs)]
Expand Down

0 comments on commit b0daea2

Please sign in to comment.