[plt-scheme] [scribble] syntax quasi/unquote

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Apr 29 12:20:57 EDT 2010

At Thu, 29 Apr 2010 11:13:56 -0400, Eric Tanter wrote:
> >> Meanwhile, you can use
> >> `eval:alts' to separate the typeset expression from the evaluated
> >> expression. Then, for the typeset part, escape to use SCHEME:
> >> 
> >> @interaction[
> >> (eval:alts @#,SCHEME[#`(#,10)] #`(#,10))
> >> ]
> > 
> > Sorry I did not understand that. 
> Despite the fact that there is no entry in the manul for eval:alts, 

Sorry - I've added an index entry to point to the description in
`interaction' for future doc builds.

> I finally 
> figured out that eval:alts typesets its first argument and evaluates the 
> second. 
> I don't see how this helps me in my issue however. I already know how to 
> typeset my macro without evaluating, ie. using @SCHEMEBLOCK.
> What I don't manage to do is to evaluate the macro definition in a given 
> evaluator.
> So using eval:alts, I can't give the macro definition as second parameter.
> any idea?

I thought that something like this might work

 (define-syntax-rule @INTERACTION[form ...]
   @interaction[(eval:alts @#,SCHEMEBLOCK[form] form) ...])

but the problem is that the first part o `eval:lats' must be an
element, instead of a block.

So, here's a different idea. The `def+int', etc. forms recognize
`unsyntax' by its binding, so you can just shadow that binding, like

 @(let ([unsyntax 'hide]) 
     (define l 
      #`(#,(+ 1 2)))

Posted on the users mailing list.