scribble/comment-reader doc tweaks

original commit: ec30c8c2545e995770fe6d35896b91d08bddec74
This commit is contained in:
Matthew Flatt 2013-12-08 07:46:29 -07:00
parent a93ee701fd
commit 6d992d7a2f

View File

@ -416,25 +416,34 @@ because the @"@"-reader would drop comments within the
@racket[racketblock] before giving @racket[racketblock] before giving
@racketmodname[scribble/comment-reader] a chance to convert them. @racketmodname[scribble/comment-reader] a chance to convert them.
@racketmodname[scribble/comment-reader] uses @racket[unsyntax] to The implementation of @racketmodname[scribble/comment-reader] uses @racket[unsyntax] to
typeset comments. When using @racketmodname[scribble/comment-reader] typeset comments. When using @racketmodname[scribble/comment-reader]
with, for instance, @racket[RACKETBLOCK], which specifies with, for instance, @racket[RACKETBLOCK], @racket[unsyntax] does not escape,
@racket[UNSYNTAX] as @racket[escape-id], this causes problems. You can since @racket[RACKETBLOCK] uses @racket[UNSYNTAX] as its escape form. You can
pass a new @racket[escape-id] for declare an escape identifier for
@racketmodname[scribble/comment-reader] by using @racket[#:escape-id]: @racketmodname[scribble/comment-reader] with @racket[#:escape-id]. For example,
@verbatim[#:indent 2]|{ @verbatim[#:indent 2]|{
@#reader scribble/comment-reader #:escape-id UNSYNTAX @#reader scribble/comment-reader #:escape-id UNSYNTAX
(RACKETBLOCK (RACKETBLOCK
(define-syntax (m syn) (define-syntax (m stx)
(syntax-case syn () (syntax-case stx ()
[(_ x) [(_ x)
;; Well this was silly ;; Well this was silly
#`(#,x)])) #`(#,x)]))
) )
}| }|
generates
@#reader scribble/comment-reader #:escape-id UNSYNTAX
(RACKETBLOCK
(define-syntax (m stx)
(syntax-case stx ()
[(_ x)
;; Well this was silly
#`(#,x)]))
)
@; ------------------------------------------------------------------------ @; ------------------------------------------------------------------------
@subsection{Code Fonts and Styles} @subsection{Code Fonts and Styles}