add syntax-local-binding
authorAndy Wingo <wingo@pobox.com>
Sun, 15 Jan 2012 16:51:02 +0000 (17:51 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 19 Jan 2012 11:38:27 +0000 (12:38 +0100)
commit9b0975f1dc41ddd10d81fb5b0965b9e9a54ef37a
treed361ad2291377cf541f2a476b68b792734fc249c
parent1ceeca0a76809248aa974685756e0f05c7f64200
add syntax-local-binding

* module/ice-9/boot-9.scm (syntax-local-binding): New binding.

* module/ice-9/psyntax.scm: Locally define a fluid that holds the
  "transformer environment".  with-transformer-environment calls a
  procedure with the transformer environment, or raises an error if
  called outside the extent of a transformer.  Bind
  transformer-environment in expand-macro.
  (resolve-identifier): Backport this helper from master.
  (syntax-local-binding): New procedure to return binding information of
  a bound identifier (a lexical, macro, a pattern variable, a displaced
  lexical, a global, or some other form).

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-macros.texi (Syntax Transformer Helpers): Add docs for
  syntax-local-binding, and syntax-source, and move some other
  descriptions to this new section.
doc/ref/api-macros.texi
module/ice-9/boot-9.scm
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm