fixed PR 9140
svn: r8374
This commit is contained in:
parent
6018c35cc8
commit
d219107a0a
|
@ -285,10 +285,8 @@ profile todo:
|
||||||
(when (and cms
|
(when (and cms
|
||||||
(pair? cms))
|
(pair? cms))
|
||||||
(print-bug-to-stderr msg cms))
|
(print-bug-to-stderr msg cms))
|
||||||
|
|
||||||
(let ([srcs-to-display (find-src-to-display exn cms)])
|
(let ([srcs-to-display (find-src-to-display exn cms)])
|
||||||
(for-each display-srcloc-in-error srcs-to-display)
|
(for-each display-srcloc-in-error srcs-to-display)
|
||||||
|
|
||||||
(display msg (current-error-port))
|
(display msg (current-error-port))
|
||||||
(when (exn:fail:syntax? exn)
|
(when (exn:fail:syntax? exn)
|
||||||
(show-syntax-error-context (current-error-port) exn))
|
(show-syntax-error-context (current-error-port) exn))
|
||||||
|
|
|
@ -351,7 +351,17 @@
|
||||||
(exact? x)
|
(exact? x)
|
||||||
(real? x)
|
(real? x)
|
||||||
(not (integer? x))))])
|
(not (integer? x))))])
|
||||||
(parameterize ([pretty-print-columns width]
|
(parameterize (
|
||||||
|
;; these three handlers aren't used, but are set to override the user's settings
|
||||||
|
[pretty-print-print-line (λ (line-number op old-line dest-columns)
|
||||||
|
(when (and (not (equal? line-number 0))
|
||||||
|
(not (equal? dest-columns 'infinity)))
|
||||||
|
(newline op))
|
||||||
|
0)]
|
||||||
|
[pretty-print-pre-print-hook (λ (val port) (void))]
|
||||||
|
[pretty-print-post-print-hook (λ (val port) (void))]
|
||||||
|
|
||||||
|
[pretty-print-columns width]
|
||||||
[pretty-print-size-hook
|
[pretty-print-size-hook
|
||||||
(λ (value display? port)
|
(λ (value display? port)
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
|
|
||||||
#lang scheme/unit
|
#lang scheme/unit
|
||||||
|
|
||||||
(require (lib "string-constant.ss" "string-constants")
|
(require (lib "string-constant.ss" "string-constants")
|
||||||
(lib "cmdline.ss")
|
|
||||||
(lib "contract.ss")
|
(lib "contract.ss")
|
||||||
"drsig.ss"
|
"drsig.ss"
|
||||||
(lib "mred.ss" "mred")
|
(lib "mred.ss" "mred")
|
||||||
(lib "framework.ss" "framework")
|
(lib "framework.ss" "framework")
|
||||||
(lib "class.ss")
|
(lib "class.ss")
|
||||||
(prefix-in pretty-print: (lib "pretty.ss"))
|
|
||||||
(prefix-in print-convert: (lib "pconvert.ss"))
|
|
||||||
(lib "include.ss")
|
|
||||||
(lib "list.ss")
|
(lib "list.ss")
|
||||||
scheme/path
|
scheme/path
|
||||||
(lib "external.ss" "browser")
|
(lib "external.ss" "browser")
|
||||||
|
|
|
@ -41,7 +41,16 @@
|
||||||
(not (integer? x))))
|
(not (integer? x))))
|
||||||
|
|
||||||
(define (do-printing pretty value port)
|
(define (do-printing pretty value port)
|
||||||
(parameterize ([pretty-print-columns 'infinity]
|
(parameterize (;; these three handlers aren't used, but are set to override the user's settings
|
||||||
|
[pretty-print-print-line (λ (line-number op old-line dest-columns)
|
||||||
|
(when (and (not (equal? line-number 0))
|
||||||
|
(not (equal? dest-columns 'infinity)))
|
||||||
|
(newline op))
|
||||||
|
0)]
|
||||||
|
[pretty-print-pre-print-hook (λ (val port) (void))]
|
||||||
|
[pretty-print-post-print-hook (λ (val port) (void))]
|
||||||
|
[pretty-print-columns 'infinity]
|
||||||
|
|
||||||
[pretty-print-size-hook
|
[pretty-print-size-hook
|
||||||
(λ (value display? port)
|
(λ (value display? port)
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Reference in New Issue
Block a user