fix module-hygiene corner case by relying more on syntax objects
authorAndy Wingo <wingo@pobox.com>
Sun, 6 Jun 2010 11:00:59 +0000 (13:00 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 6 Jun 2010 11:00:59 +0000 (13:00 +0200)
commit9846796b6abb6ecbce0d596db32daa7ac5921a2a
tree13cbb01b4af3b01584df16a4e4a2d451345dc336
parenta96434cc33eab7d593b148d57056863a9f814b41
fix module-hygiene corner case by relying more on syntax objects

* module/ice-9/psyntax.scm (chi-macro): Instead of assuming that output
  of a macro should be scoped relative to the module that was current
  when the macro was defined, allow the module information associated
  with the syntax object itself to pass through unmolested. Fixes bug
  29860.
  (datum->syntax): Propagate the module of the identifier through to the
  new syntax object, so that datum->syntax preserves module hygiene in
  addition to lexical hygiene.
  (include, include-from-path): Refactor to plumb though the hygiene
  information from the filename instead of the `include', allowing
  hygiene from the original caller of include-from-path to propagate
  through.

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

* test-suite/tests/syncase.test ("macro-generating macro"): Add test for
  bug 29860.
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/tests/syncase.test