be a bit more systematic with tabbing and magic square-bracket-ing for 'for's
also, add in for/sum and for/product
This commit is contained in:
parent
86c1504c19
commit
a1446a037b
|
@ -90,19 +90,33 @@
|
||||||
(preferences:set-default 'framework:square-bracket:local
|
(preferences:set-default 'framework:square-bracket:local
|
||||||
'("local")
|
'("local")
|
||||||
(λ (x) (and (list? x) (andmap string? x))))
|
(λ (x) (and (list? x) (andmap string? x))))
|
||||||
|
|
||||||
|
(define all-fors
|
||||||
|
(let ()
|
||||||
|
(define base-fors
|
||||||
|
'(for for/list for/hash for/hasheq for/hasheqv for/and for/or
|
||||||
|
for/lists for/first for/last for/fold for/vector for/flvector
|
||||||
|
for/sum for/product))
|
||||||
|
(define untyped-fors
|
||||||
|
(append base-fors
|
||||||
|
(map (λ (x) (string->symbol (regexp-replace #rx"^for" (symbol->string x) "for*")))
|
||||||
|
base-fors)))
|
||||||
|
(define all-fors
|
||||||
|
(append untyped-fors
|
||||||
|
(map (λ (x) (string->symbol (string-append (symbol->string x) ":")))
|
||||||
|
untyped-fors)))
|
||||||
|
all-fors))
|
||||||
|
|
||||||
(preferences:set-default 'framework:square-bracket:letrec
|
(preferences:set-default 'framework:square-bracket:letrec
|
||||||
(let ([fors '("for" "for/fold" "for/list" "for/hash" "for/and" "for/or" "for/first" "for/last")])
|
(append (map symbol->string all-fors)
|
||||||
(append fors
|
'("let"
|
||||||
(map (λ (x) (regexp-replace #rx"for" x "for*"))
|
"let*" "let-values" "let*-values"
|
||||||
fors)
|
"let-syntax" "let-struct" "let-syntaxes"
|
||||||
'("let"
|
"match-let" "match-let*" "match-letrec"
|
||||||
"let*" "let-values" "let*-values"
|
"letrec"
|
||||||
"let-syntax" "let-struct" "let-syntaxes"
|
"letrec-syntaxes" "letrec-syntaxes+values" "letrec-values"
|
||||||
"match-let" "match-let*" "match-letrec"
|
"parameterize"
|
||||||
"letrec"
|
"with-syntax"))
|
||||||
"letrec-syntaxes" "letrec-syntaxes+values" "letrec-values"
|
|
||||||
"parameterize"
|
|
||||||
"with-syntax")))
|
|
||||||
(λ (x) (and (list? x) (andmap string? x))))
|
(λ (x) (and (list? x) (andmap string? x))))
|
||||||
|
|
||||||
(preferences:set-default 'framework:white-on-black? #f boolean?)
|
(preferences:set-default 'framework:white-on-black? #f boolean?)
|
||||||
|
@ -241,7 +255,7 @@
|
||||||
inherit sequence))
|
inherit sequence))
|
||||||
(for-each (λ (x)
|
(for-each (λ (x)
|
||||||
(hash-set! hash-table x 'lambda))
|
(hash-set! hash-table x 'lambda))
|
||||||
'(
|
`(
|
||||||
cases
|
cases
|
||||||
instantiate super-instantiate
|
instantiate super-instantiate
|
||||||
syntax/loc quasisyntax/loc
|
syntax/loc quasisyntax/loc
|
||||||
|
@ -268,16 +282,9 @@
|
||||||
splicing-letrec-syntax splicing-let-syntaxes
|
splicing-letrec-syntax splicing-let-syntaxes
|
||||||
splicing-letrec-syntaxes splicing-letrec-syntaxes+values
|
splicing-letrec-syntaxes splicing-letrec-syntaxes+values
|
||||||
splicing-local
|
splicing-local
|
||||||
|
|
||||||
for for/list for/hash for/hasheq for/hasheqv for/and for/or
|
|
||||||
for/lists for/first for/last for/fold for/vector for/flvector
|
|
||||||
for* for*/list for*/hash for*/hasheq for*/hasheqv for*/and for*/or
|
|
||||||
for*/lists for*/first for*/last for*/fold for*/vector for*/flvector
|
|
||||||
|
|
||||||
for: for/list: for/hash: for/hasheq: for/hasheqv: for/and: for/or:
|
,@all-fors
|
||||||
for/lists: for/first: for/last: for/fold: for/vector: for/flvector:
|
|
||||||
for*: for*/list: for*/hash: for*/hasheq: for*/hasheqv: for*/and: for*/or:
|
|
||||||
for*/lists: for*/first: for*/last: for*/fold: for*/vector: for*/flvector:
|
|
||||||
do:
|
do:
|
||||||
|
|
||||||
kernel-syntax-case
|
kernel-syntax-case
|
||||||
|
|
Loading…
Reference in New Issue
Block a user