[racket] unsyntax in Scribble examples

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Aug 15 15:18:07 EDT 2011

At Mon, 15 Aug 2011 10:40:53 -0500, Casey Klein wrote:
> Compiling the following Scribble program complains that x is unbound
> on the last line:
> #lang scribble/doc
> @(require scribble/eval)
> @examples[#:eval (make-base-eval)
>           (define x #'q)
>           #`(a #,x c)]
> Of course, it is unbound in the expression doing the eval-ing, but
> that shouldn't matter because it's only the eval-ed expression that
> refers to x.
> Is `examples' doing something, or am I?

The `examples' form itself uses `unsyntax' as an escape.

Forms like `racketblock' and `racketinput' have `RACKETBLOCK' and
`RACKETINPUT' variants that use `UNSYNTAX' as the escae form, instead,
but I never got around to `examples', etc. I think it would be better
to add a keyword to specify an alternate escape form, so I'll look into
adding that.

Posted on the users mailing list.