diff --git a/collects/racket/syntax.rkt b/collects/racket/syntax.rkt index 98bfaed527..223e84023e 100644 --- a/collects/racket/syntax.rkt +++ b/collects/racket/syntax.rkt @@ -81,7 +81,10 @@ (define (record-disappeared-uses ids) (let ([uses (current-recorded-disappeared-uses)]) (when uses - (current-recorded-disappeared-uses (append ids uses))))) + (current-recorded-disappeared-uses + (append + (map syntax-local-introduce ids) + uses))))) ;; == Identifier formatting == diff --git a/collects/scribblings/reference/syntax-util.scrbl b/collects/scribblings/reference/syntax-util.scrbl index 083721748e..f31f449105 100644 --- a/collects/scribblings/reference/syntax-util.scrbl +++ b/collects/scribblings/reference/syntax-util.scrbl @@ -155,7 +155,8 @@ object. Looks up @racket[id] in the syntactic environment (as @racket[syntax-local-value]). If the lookup succeeds and returns a value satisfying the predicate, the value is returned and @racket[id] -is recorded as a disappeared use. If the lookup fails or if the value +is recorded as a disappeared use by calling @racket[record-disappeared-uses]. +If the lookup fails or if the value does not satisfy the predicate, @racket[#f] is returned and the identifier is not recorded as a disappeared use. } @@ -163,9 +164,11 @@ identifier is not recorded as a disappeared use. @defproc[(record-disappeared-uses [ids (listof identifier?)]) void?]{ -Add @racket[ids] to @racket[(current-recorded-disappeared-uses)]. If -not used within the extent of a @racket[with-disappeared-uses] form or -similar, has no effect. +Add @racket[ids] to @racket[(current-recorded-disappeared-uses)] after calling +@racket[syntax-local-introduce] on each of the identifiers. + +If not used within the extent of a @racket[with-disappeared-uses] +form or similar, has no effect. }