removed current-print from the language dialog

svn: r10027
This commit is contained in:
Robby Findler 2008-05-30 02:08:59 +00:00
parent 0d81c599bd
commit d40b191eb7
4 changed files with 16 additions and 22 deletions

View File

@ -154,7 +154,7 @@
(= (vector-length printable)
(procedure-arity make-simple-settings))
(boolean? (vector-ref printable 0))
(memq (vector-ref printable 1) '(constructor quasiquote write current-print))
(memq (vector-ref printable 1) '(constructor quasiquote write))
(memq (vector-ref printable 2)
'(mixed-fraction
mixed-fraction-e
@ -191,7 +191,7 @@
insert-newlines
annotations))
;; case-sensitive : boolean
;; printing-style : (union 'write 'constructor 'quasiquote 'current-print)
;; printing-style : (union 'write 'constructor 'quasiquote)
;; fraction-style : (union 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e)
;; show-sharing : boolean
;; insert-newlines : boolean
@ -236,8 +236,7 @@
(string-constant output-style-label)
(list (string-constant constructor-printing-style)
(string-constant quasiquote-printing-style)
(string-constant write-printing-style)
(string-constant print-printing-style))
(string-constant write-printing-style))
output-panel
(λ (rb evt)
(let ([on? (not (= (send rb get-selection) 3))])
@ -264,8 +263,7 @@
(case (send output-style get-selection)
[(0) 'constructor]
[(1) 'quasiquote]
[(2) 'write]
[(3) 'current-print])
[(2) 'write])
(if (send fraction-style get-value)
'repeating-decimal-e
'mixed-fraction-e)
@ -282,12 +280,7 @@
(case (simple-settings-printing-style settings)
[(constructor) 0]
[(quasiquote) 1]
[(write) 2]
[(current-print) 3]))
(let ([on? (not (eq? 'current-print (simple-settings-printing-style settings)))])
(send fraction-style enable on?)
(send show-sharing enable on?)
(send insert-newlines enable on?))
[(write) 2]))
(send fraction-style set-value (eq? (simple-settings-fraction-style settings)
'repeating-decimal-e))
(send show-sharing set-value (simple-settings-show-sharing settings))
@ -301,9 +294,6 @@
;; 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)
(if (eq? (simple-settings-printing-style settings) 'current-print)
(parameterize ([current-output-port port])
((current-print) value))
(let ([converted-value (simple-module-based-language-convert-value value settings)])
(setup-printing-parameters
(λ ()
@ -318,7 +308,7 @@
(pretty-print converted-value port))
(newline port)]))
settings
width))))
width)))
;; setup-printing-parameters : (-> void) simple-settings number -> void
(define (setup-printing-parameters thunk settings width)
@ -386,7 +376,6 @@
(define (simple-module-based-language-convert-value value settings)
(case (simple-settings-printing-style settings)
[(write) value]
[(current-print) value]
[(constructor)
(parameterize ([constructor-style-printing #t]
[show-sharing (simple-settings-show-sharing settings)]
@ -456,7 +445,6 @@
(define (convert-value value)
,(case (simple-settings-printing-style setting)
[(write) `value]
[(current-print) `value]
[(constructor)
`(parameterize ([constructor-style-printing #t]
[show-sharing ,(simple-settings-show-sharing setting)])

View File

@ -1402,8 +1402,7 @@ TODO
(current-value-port (get-value-port))
(current-input-port (get-in-box-port))
(current-print (lambda (v)
(display-results (list v)))))
(current-print (lambda (v) (display-results (list v)))))
(define/private (initialize-dispatch-handler) ;;; =User=
(let* ([primitive-dispatch-handler (event-dispatch-handler)])

View File

@ -1319,7 +1319,7 @@ all of the names in the tools library, for use defining keybindings
drscheme:language:simple-settings-printing-style
(drscheme:language:simple-settings?
. -> .
(symbols 'constructor 'quasiquote 'write 'current-print))
(symbols 'constructor 'quasiquote 'write))
(simple-settings)
@{Extracts the printing-style setting from a simple-settings.})
@ -1373,7 +1373,7 @@ all of the names in the tools library, for use defining keybindings
(proc-doc/names
drscheme:language:make-simple-settings
(-> boolean?
(symbols 'constructor 'quasiquote 'write 'current-print)
(symbols 'constructor 'quasiquote 'write)
(symbols 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e)
boolean?
boolean?

View File

@ -22,6 +22,13 @@
the tools interface. Use drscheme:debug:error-display-handler/stacktrace
instead.
. current-print's behavior is different in DrScheme. It
now prints to a separate port (the same on the REPL
printer uses, namely with blue output) and the style of
printing that it uses is controlled by the language
dialog (which means that the `current-print' option is
now gone from the language dialog)
------------------------------
Version 372
------------------------------