How about: (define-syntax eval-var (syntax-rules () ((_ var) var)))
? Then you don't need to import (ice-9 local-eval) and re-export things from there. Just for elucidation: The reason why we chose the syntax-case macro system for Guile was that it *both* gives you hygiene *and* quite a lot of control. The reason why the original code didn't work (your first post in this thread) is that "(the-environment)" was expanded in the lexical context where it was written (the Scheme+ module), However, syntax-case gives you the ability to insert that identifier into the context of the expansion instead: (define-syntax eval-var (lambda (x) (syntax-case x () ((_ var) (with-syntax ((the-environment (datum->syntax #'var 'the-environment))) #'(let ((env (the-environment))) (local-eval (quote var) env))))))) (It's the datum->syntax form which gives the lexical context of var to the-environment.)