fixed PR 9140
svn: r8374
This commit is contained in:
parent
6018c35cc8
commit
d219107a0a
|
@ -275,7 +275,7 @@ profile todo:
|
||||||
(let ([note (new note%)])
|
(let ([note (new note%)])
|
||||||
(send note set-callback (λ () (show-backtrace-window msg cms)))
|
(send note set-callback (λ () (show-backtrace-window msg cms)))
|
||||||
(write-special note (current-error-port))
|
(write-special note (current-error-port))
|
||||||
(display #\space (current-error-port)))))))
|
(display #\space (current-error-port)) )))))
|
||||||
|
|
||||||
(define (show-error-and-highlight msg exn highlight-errors)
|
(define (show-error-and-highlight msg exn highlight-errors)
|
||||||
(let ([cms
|
(let ([cms
|
||||||
|
@ -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
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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