From a85a71984da3c1c8c0c4a90b3fa4a220a07aa183 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Wed, 6 Feb 2013 17:55:04 -0500 Subject: [PATCH] preserve lexical context, src, etc for sequence syntax expansion The previous version of the code replaced the implicit #%app with the kernel #%app (ie, #%plain-app), causing sequence functions that take keyword arguments to fail. --- collects/racket/private/for.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/racket/private/for.rkt b/collects/racket/private/for.rkt index fc61570f90..65208e778c 100644 --- a/collects/racket/private/for.rkt +++ b/collects/racket/private/for.rkt @@ -118,7 +118,8 @@ (if (identifier? stx) (proc1) (datum->syntax stx - #`(#,(proc1) . #,(cdr (syntax-e stx))) + ;; Use cons, not #`(#,op #,@args), to avoid replacing implicit #%app binding + (cons (proc1) (cdr (syntax-e stx))) stx stx))) proc1)