made yellow/black REPL warning go before output, rather than after
svn: r958 original commit: c9e81b63fa227e55c200a4484c00446ae2d1d2ec
This commit is contained in:
parent
8028b96fef
commit
6c7daca1b1
|
@ -884,6 +884,7 @@ WARNING: printf is rebound in the body of the unit to always
|
||||||
set-allow-edits
|
set-allow-edits
|
||||||
get-allow-edits
|
get-allow-edits
|
||||||
insert-between
|
insert-between
|
||||||
|
insert-before
|
||||||
submit-to-port?
|
submit-to-port?
|
||||||
on-submit
|
on-submit
|
||||||
send-eof-to-in-port
|
send-eof-to-in-port
|
||||||
|
@ -988,11 +989,21 @@ WARNING: printf is rebound in the body of the unit to always
|
||||||
(define/public-final (insert-between str/snp)
|
(define/public-final (insert-between str/snp)
|
||||||
(insert str/snp unread-start-point unread-start-point)
|
(insert str/snp unread-start-point unread-start-point)
|
||||||
(set! unread-start-point (+ unread-start-point
|
(set! unread-start-point (+ unread-start-point
|
||||||
(cond
|
(amt-of-space str/snp))))
|
||||||
[(string? str/snp) (string-length str/snp)]
|
|
||||||
[(is-a? str/snp snip%)
|
;; insert-before : string/snp -> void
|
||||||
(send str/snp get-count)]))))
|
;; inserts something before both the insertion point and the unread region
|
||||||
|
(define/public-final (insert-before str/snp)
|
||||||
|
(insert str/snp insertion-point insertion-point)
|
||||||
|
(let ([amt (amt-of-space str/snp)])
|
||||||
|
(set! insertion-point (+ insertion-point amt))
|
||||||
|
(set! unread-start-point (+ unread-start-point amt))))
|
||||||
|
|
||||||
|
(define/private (amt-of-space str/snp)
|
||||||
|
(cond
|
||||||
|
[(string? str/snp) (string-length str/snp)]
|
||||||
|
[(is-a? str/snp snip%)
|
||||||
|
(send str/snp get-count)]))
|
||||||
|
|
||||||
(define/public-final (get-insertion-point) insertion-point)
|
(define/public-final (get-insertion-point) insertion-point)
|
||||||
(define/public-final (set-insertion-point ip) (set! insertion-point ip))
|
(define/public-final (set-insertion-point ip) (set! insertion-point ip))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user