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.}