change render og var-ids under a quote

svn: r14108

original commit: 073013d8eff555d555bba470733eb0bd21855681
This commit is contained in:
Matthew Flatt 2009-03-15 13:30:26 +00:00
parent a1b7be1a90
commit 763a1a1b7d
2 changed files with 9 additions and 4 deletions

View File

@ -123,7 +123,8 @@
(make-element style content)))
(define (typeset-atom c out color? quote-depth)
(if (var-id? (syntax-e c))
(if (and (var-id? (syntax-e c))
(zero? quote-depth))
(out (format "~s" (let ([v (var-id-sym (syntax-e c))])
(if (syntax? v)
(syntax-e v)
@ -135,7 +136,9 @@
(let ([sc (syntax-e c)])
(let ([s (format "~s" (if (literal-syntax? sc)
(literal-syntax-stx sc)
sc))])
(if (var-id? sc)
(var-id-sym sc)
sc)))])
(if (and (symbol? sc)
((string-length s) . > . 1)
(char=? (string-ref s 0) #\_)

View File

@ -90,7 +90,8 @@ typically used to typeset results.}
When @scheme[to-paragraph] and variants encounter a @scheme[var-id]
structure, it is typeset as @scheme[sym] in the variable font, like
@scheme[schemevarfont].}
@scheme[schemevarfont]---unless the @scheme[var-id] appears under
quote or quasiquote, in which case @scheme[sym] is typeset as a symbol.}
@defstruct[shaped-parens ([val any/c]
@ -149,4 +150,5 @@ Provided @scheme[for-syntax]; returns @scheme[#t] if @scheme[v] is an
Provided @scheme[for-syntax]; like @scheme[element-id-transformer] for
a transformer that produces @scheme[sym] typeset as a variable (like
@scheme[schemevarfont]).}
@scheme[schemevarfont])---unless it appears under quote or quasiquote,
in which case @scheme[sym] is typeset as a symbol.}