From chicken scheme manual:
define-syntax evaluates the procedure in a distinct expansion environment (initially having access to the exported identifiers of the scheme module)
Is it possible to inject the user-function to the expansion environment?
(define-syntax my-macro
(er-macro-transformer
(lambda (exp rename compare)
(user-function exp)))
Yes. Use begin-for-syntax
or require-extension-for-syntax
(the last one also known as use-for-syntax
.