<br><div class="gmail_quote">On Fri, Jan 16, 2009 at 6:12 PM, Ryan Culpepper <span dir="ltr"><<a href="mailto:ryanc@ccs.neu.edu">ryanc@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c"><br></div></div>
That approach has a flaw that has nothing to do with the error you got. Suppose that you write a module that imports just 'cond-it', not 'if-it'. Or suppose that your module renames them or prefixes their names when you import them. Then when your macro creates the 'if-it' identifier, it will have the context of that module, where 'if-it' isn't bound. You're trying to use 'if-it' to carry the lexical context for the 'it' binding it introduces, but its lexical context is already doing work---it tells the macro expander where to look up the 'if-it' macro.<br>
</blockquote><div><br>I see. Thanks. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I wrote a blog post about syntax parameters a couple years ago:<br>
<a href="http://macrologist.blogspot.com/2006/04/macros-parameters-binding-and.html" target="_blank">http://macrologist.blogspot.com/2006/04/macros-parameters-binding-and.html</a><br>
<br>
Other than that, the Guide and the Reference.<br>
<br>
I'm also working on a collection of macro techniques and design patterns. I hope to post a draft of it sometime in the near future.</blockquote><div><br>Thanks for the link - looking forward to your draft!<br><br>Thanks,<br>
yc<br><br></div><div> </div></div><br>