Reading through R6RS. It seems to actually present a really nice system for programming in, even if it’s pretty big compared to R5RS. It feels seriously serious now. Looking through the library section on syntax-case, I found this:
Using datum->syntax, it is even possible to break hygiene entirely and write macros in the style of old Lisp macros. The lisp-transformer procedure defined below creates a transformer that converts its input into a datum, calls the programmer’s procedure on this datum, and converts the result back into a syntax object scoped where the original macro use appeared.
(define lisp-transformer
(lambda (p)
(lambda (x)
(syntax-case x ()
[(kwd . rest)
(datum->syntax #’kwd
(p (syntax->datum x)))])
It’s nice to know, after spending all that time and effort trying to ensure hygiene, it’s that easy to break.