* Updated manual to explain #:escape-id parameter to comment-reader

pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/manual.scrbl
* Changed parameter name to #:escape-id.
  pkgs/scribble-pkgs/scribble-lib/scribble/comment-reader.rkt

original commit: 9907165af8009585ab5e0f4427d68acbdeadc0a0
This commit is contained in:
William J. Bowman 2013-11-24 22:27:29 -05:00 committed by Matthew Flatt
parent 06fcc23c24
commit bebefaa45c
2 changed files with 21 additions and 1 deletions

View File

@ -416,6 +416,26 @@ 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
typeset comments. When using @racketmodname[scribble/comment-reader]
with, for instance, @racket[RACKETBLOCK], which specifies
@racket[UNSYNTAX] as @racket[escape-id], this causes problems. You can
pass a new @racket[escape-id] for
@racketmodname[scribble/comment-reader] by using @racket[#:escape-id]:
@verbatim[#:indent 2]|{
@#reader scribble/comment-reader #:escape-id UNSYNTAX
(RACKETBLOCK
(define-syntax (m syn)
(syntax-case syn ()
[(_ x)
;; Well this was silly
#`(#,x)]))
)
}|
@; ------------------------------------------------------------------------ @; ------------------------------------------------------------------------
@subsection{Code Fonts and Styles} @subsection{Code Fonts and Styles}

View File

@ -18,7 +18,7 @@
(define (read-unsyntaxer port) (define (read-unsyntaxer port)
(let-values ([(l c p) (port-next-location port)]) (let-values ([(l c p) (port-next-location port)])
(if (eq? (read port) '#:unsyntax) (if (eq? (read port) '#:escape-id)
(read port) (read port)
(begin (begin
(set-port-next-location! port l c p) (set-port-next-location! port l c p)