...
original commit: 816cb1bfd74c88817e9fe7e35d0804b1c47869b8
This commit is contained in:
parent
576c81acae
commit
44c8da6e62
|
@ -64,7 +64,6 @@
|
||||||
delay-action
|
delay-action
|
||||||
local-busy-cursor
|
local-busy-cursor
|
||||||
unsaved-warning
|
unsaved-warning
|
||||||
sexp-snip<%>
|
|
||||||
read-snips/chars-from-text
|
read-snips/chars-from-text
|
||||||
get-choice
|
get-choice
|
||||||
open-input-buffer))
|
open-input-buffer))
|
||||||
|
|
|
@ -177,10 +177,6 @@
|
||||||
(send dialog show #t)
|
(send dialog show #t)
|
||||||
result)]))
|
result)]))
|
||||||
|
|
||||||
(define sexp-snip<%> (interface ((class->interface snip%))
|
|
||||||
get-chars/snips ; : (-> (list-of (union char (instance-of text%) (instance-of snip%))))
|
|
||||||
))
|
|
||||||
|
|
||||||
;; better to treat all snips uniformly -- always processes text
|
;; better to treat all snips uniformly -- always processes text
|
||||||
;; snips, etc. in certain way, rather than just the top-level ones.
|
;; snips, etc. in certain way, rather than just the top-level ones.
|
||||||
;; process sexp-snip<%> returned text%s as if top-level.
|
;; process sexp-snip<%> returned text%s as if top-level.
|
||||||
|
@ -199,19 +195,6 @@
|
||||||
[(not (<= (+ (unbox pos-box) (send snip get-count)) end))
|
[(not (<= (+ (unbox pos-box) (send snip get-count)) end))
|
||||||
(set! get-next (lambda () eof))
|
(set! get-next (lambda () eof))
|
||||||
eof]
|
eof]
|
||||||
[(is-a? snip sexp-snip<%>)
|
|
||||||
(let sexp-loop ([l (send snip get-chars/snips)])
|
|
||||||
(cond
|
|
||||||
[(null? l)
|
|
||||||
(loop (send snip next))]
|
|
||||||
[else
|
|
||||||
(let ([snip (car l)])
|
|
||||||
(cond
|
|
||||||
[(is-a? snip sexp-snip<%>)
|
|
||||||
(sexp-loop (append (send snip get-chars/snips) (cdr l)))]
|
|
||||||
[else
|
|
||||||
(set! get-next (lambda () (sexp-loop (cdr l))))
|
|
||||||
(car l)]))]))]
|
|
||||||
[(is-a? snip string-snip%)
|
[(is-a? snip string-snip%)
|
||||||
(let ([str (send snip get-text 0 (send snip get-count))])
|
(let ([str (send snip get-text 0 (send snip get-count))])
|
||||||
(let string-loop ([n 0])
|
(let string-loop ([n 0])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user