Reuse indentation strings.
svn: r2970
This commit is contained in:
parent
4f6b53c1d0
commit
5ee9c60b78
|
@ -29,6 +29,14 @@
|
||||||
(map (lambda (b) (cons (bytes-ref b 0) (bytes-ref b 1)))
|
(map (lambda (b) (cons (bytes-ref b 0) (bytes-ref b 1)))
|
||||||
'(#"()" #"[]" #"{}" #"<>")))
|
'(#"()" #"[]" #"{}" #"<>")))
|
||||||
|
|
||||||
|
(define make-spaces
|
||||||
|
(let ([t (make-hash-table)])
|
||||||
|
(lambda (n)
|
||||||
|
(hash-table-get t n
|
||||||
|
(lambda ()
|
||||||
|
(let ([s (make-string n #\space)])
|
||||||
|
(hash-table-put! t n s) s))))))
|
||||||
|
|
||||||
(define (dispatcher char inp source-name line-num col-num position)
|
(define (dispatcher char inp source-name line-num col-num position)
|
||||||
(define (next-syntax readtable . plain?)
|
(define (next-syntax readtable . plain?)
|
||||||
(let ([read (if (and (pair? plain?) (car plain?))
|
(let ([read (if (and (pair? plain?) (car plain?))
|
||||||
|
@ -151,8 +159,7 @@
|
||||||
(if (and (< curline line) (< mincol (syntax-column stx)))
|
(if (and (< curline line) (< mincol (syntax-column stx)))
|
||||||
(list* stx
|
(list* stx
|
||||||
(datum->syntax-object stx
|
(datum->syntax-object stx
|
||||||
(make-string
|
(make-spaces (- (syntax-column stx) mincol))
|
||||||
(- (syntax-column stx) mincol) #\space)
|
|
||||||
stx)
|
stx)
|
||||||
r)
|
r)
|
||||||
(cons stx r)))))))))
|
(cons stx r)))))))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user