From 58b270adbaad6ae4fa59f86e55b3554fa165549c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 1 Jun 2018 17:43:34 +0800 Subject: [PATCH] defform: typeset `...+` as meta like `...` Within `defform`, `...+` should be treated like `...` and made to not refer to a `...+` binding. (The identifier `...+` is bound by `syntax/parse`, so it's not difficult to end up with a for-label binding of `...+`.) --- scribble-lib/scribble/private/manual-scheme.rkt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scribble-lib/scribble/private/manual-scheme.rkt b/scribble-lib/scribble/private/manual-scheme.rkt index 67c42584..74023388 100644 --- a/scribble-lib/scribble/private/manual-scheme.rkt +++ b/scribble-lib/scribble/private/manual-scheme.rkt @@ -247,12 +247,16 @@ (define-for-syntax (strip-ellipsis-context a) (define a-ellipsis (datum->syntax a '...)) + (define a-ellipsis+ (datum->syntax a '...+)) (let loop ([a a]) (cond [(identifier? a) - (if (free-identifier=? a a-ellipsis #f) - (datum->syntax #f '... a a) - a)] + (cond + [(free-identifier=? a a-ellipsis #f) + (datum->syntax #f '... a a)] + [(free-identifier=? a a-ellipsis+ #f) + (datum->syntax #f '...+ a a)] + [else a])] [(syntax? a) (datum->syntax a (loop (syntax-e a)) a a)] [(pair? a)