avoid (format "~s" x) in favor of (symbol->string x) for symbols
when doing typesetting stuff in Redex, as the former seems to have some kind of context dependency that makes it insert ||s around some upper-case symbols sometimes
This commit is contained in:
parent
ccbd5d51fd
commit
622bec0719
|
@ -374,7 +374,7 @@
|
|||
who
|
||||
(length lst)
|
||||
(apply string-append
|
||||
(format "~s" (car lst))
|
||||
(format "~s" fst)
|
||||
(map (λ (x) (format " ~s" x)) (cdr lst)))))
|
||||
(values fst snd))
|
||||
(values fst (blank)))))
|
||||
|
@ -679,7 +679,6 @@
|
|||
[(pict-token? tok) (pict-token-pict tok)]
|
||||
[else (error 'token->pict "~s" tok)]))
|
||||
|
||||
|
||||
(define (atom->tokens col span atom all-nts unquoted?)
|
||||
(cond
|
||||
[(pict? atom)
|
||||
|
@ -702,7 +701,7 @@
|
|||
(make-pict-token (+ col span) 0 sub+sup)))])]
|
||||
[(or (memq atom all-nts)
|
||||
(memq atom '(number variable variable-except variable-not-otherwise-mentioned)))
|
||||
(list (non-terminal->token col span (format "~s" atom)))]
|
||||
(list (non-terminal->token col span (symbol->string atom)))]
|
||||
[(symbol? atom)
|
||||
(list (or (rewrite-atomic col span atom literal-style)
|
||||
(make-string-token col span (symbol->string atom) (literal-style))))]
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
[(string? e)
|
||||
(values line col (+ col (string-length e)))]
|
||||
[(symbol? e)
|
||||
(values line col (+ col (string-length (format "~s" e))))]
|
||||
(values line col (+ col (string-length (symbol->string e))))]
|
||||
[(not e) (values line col col)]
|
||||
[else
|
||||
(let loop ([lws e]
|
||||
|
|
Loading…
Reference in New Issue
Block a user