diff options
author | Noah Lavine <nlavine@haverford.edu> | 2011-02-02 09:52:10 -0500 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-02-02 20:55:14 +0100 |
commit | 09cb3ae237f6563bc5d3189562cfc841784751f2 (patch) | |
tree | 547402c10b2eaa3492ecc432591695eefa9bcddb /doc/ref/api-macros.texi | |
parent | 71d0152e66628dac89d9103c60d91706fb98bba5 (diff) | |
download | guile-09cb3ae237f6563bc5d3189562cfc841784751f2.tar.gz |
macro documentation fixup
* doc/ref/api-macros.texi: make the difference between pattern variables
and lexical variables a bit clearer.
Diffstat (limited to 'doc/ref/api-macros.texi')
-rw-r--r-- | doc/ref/api-macros.texi | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/ref/api-macros.texi b/doc/ref/api-macros.texi index 1fbfa24e2..5f15fb7aa 100644 --- a/doc/ref/api-macros.texi +++ b/doc/ref/api-macros.texi @@ -574,11 +574,14 @@ Here's another solution that doesn't work: (if it then else))))))) @end example -The reason that this one doesn't work is that there are really two environments -at work here -- the environment of pattern variables, as bound by -@code{syntax-case}, and the environment of lexical variables, as bound by normal -Scheme. Here we need to introduce a piece of Scheme's environment into that of -the syntax expander, and we can do so using @code{syntax-case} itself: +The reason that this one doesn't work is that there are really two +environments at work here -- the environment of pattern variables, as +bound by @code{syntax-case}, and the environment of lexical variables, +as bound by normal Scheme. The outer let form establishes a binding in +the environment of lexical variables, but the inner let form is inside a +syntax form, where only pattern variables will be substituted. Here we +need to introduce a piece of the lexical environment into the pattern +variable environment, and we can do so using @code{syntax-case} itself: @example ;; works, but is obtuse |