From a018da21f7b811ca8d1a3555e76df91e9b6e7f09 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 19 Dec 2007 21:41:28 +0000 Subject: [PATCH] detect syntax-wrapped keyword for generate-temporaries svn: r8074 --- collects/scheme/private/with-stx.ss | 2 ++ collects/scribblings/reference/stx-ops.scrbl | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/collects/scheme/private/with-stx.ss b/collects/scheme/private/with-stx.ss index 3425dbaa02..35e4ae0e2a 100644 --- a/collects/scheme/private/with-stx.ss +++ b/collects/scheme/private/with-stx.ss @@ -78,6 +78,8 @@ (datum->syntax #f (append-number (keyword->string x)))] [(identifier? x) (datum->syntax #f (append-number (syntax-e x)))] + [(and (syntax? x) (keyword? (syntax-e x))) + (datum->syntax #f (append-number (keyword->string (syntax-e x))))] [else (datum->syntax #f (append-number 'temp))]))) l))) diff --git a/collects/scribblings/reference/stx-ops.scrbl b/collects/scribblings/reference/stx-ops.scrbl index ce0d1cb811..91339410b4 100644 --- a/collects/scribblings/reference/stx-ops.scrbl +++ b/collects/scribblings/reference/stx-ops.scrbl @@ -189,8 +189,9 @@ Returns a list of identifiers that are distinct from all other identifiers. The list contains as many identifiers as @scheme[stx-pair] contains elements. The @scheme[stx-pair] argument must be a syntax pair that can be flattened into a list. The elements -of @scheme[stx-pair] can be anything, but string, symbol, keyword, and -identifier elements will be embedded in the corresponding generated -name (useful for debugging purposes). The generated identifiers are -built with interned symbols (not @scheme[gensym]s), so the limitations -described with @scheme[current-compile] do not apply.} +of @scheme[stx-pair] can be anything, but string, symbol, keyword +(possibly wrapped as syntax), and identifier elements will be embedded +in the corresponding generated name, which is useful for debugging +purposes. The generated identifiers are built with interned symbols +(not @scheme[gensym]s), so the limitations described with +@scheme[current-compile] do not apply.}