From b231d63297850fbfed0f7a7ef5b0e55cafd1e371 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 9 Dec 2013 09:27:28 -0800 Subject: [PATCH] [bugfix] avoid auxiliary keywords such as unquote or unquote-splicing from being renamed --- piclib/built-in.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/piclib/built-in.scm b/piclib/built-in.scm index 568cff08..6cf7b28c 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -599,6 +599,16 @@ (let ((expr (walk (lambda (x) (if (symbol? x) (inject x) x)) expr))) (make-syntactic-closure mac-env '() (f expr inject compare))))) +(define-syntax define-auxiliary-syntax + (ir-macro-transformer + (lambda (expr i c) + `(define-syntax ,(cadr expr) + (sc-macro-transformer + (lambda (expr env) + (error "invalid use of auxiliary syntax"))))))) + +(define-auxiliary-syntax unquote) +(define-auxiliary-syntax unquote-splicing) (define-syntax or (ir-macro-transformer (lambda (expr inject compare)