diff --git a/collects/scribble/private/manual-form.rkt b/collects/scribble/private/manual-form.rkt index 76b8f922..17c0de12 100644 --- a/collects/scribble/private/manual-form.rkt +++ b/collects/scribble/private/manual-form.rkt @@ -55,7 +55,7 @@ (syntax->list #'(lit ...))) #'(with-togetherable-racket-variables (lit ...) - ([form spec] [form spec1] ... + ([form [defined-id spec]] [form [defined-id spec1]] ... [non-term (non-term-id non-term-form ...)] ...) (*defforms defined-id-expr '(spec spec1 ...) diff --git a/collects/scribble/private/manual-vars.rkt b/collects/scribble/private/manual-vars.rkt index c287f7d5..6cfb7b7f 100644 --- a/collects/scribble/private/manual-vars.rkt +++ b/collects/scribble/private/manual-vars.rkt @@ -75,12 +75,18 @@ (do-proc (car s-exp)))))]) (do-proc s-exp))] [(form form/none form/maybe non-term) + (define skip-id (case (syntax-e kind) + [(form) + (syntax-case s-exp () + [(defined-id actual-s-exp) (let ([id #'defined-id]) + (and (identifier? id) + id))] + [_ #f])] + [else #f])) (let loop ([form (case (syntax-e kind) - [(form) (if (identifier? s-exp) - null - (if (pair? (syntax-e s-exp)) - (cdr (syntax-e s-exp)) - null))] + [(form) + (syntax-case s-exp () + [(defined-id actual-s-exp) #'actual-s-exp])] [(form/none) s-exp] [(form/maybe) (syntax-case s-exp () @@ -88,7 +94,9 @@ [(#t (id . form)) #'form])] [(non-term) s-exp])]) (if (identifier? form) - (unless (or (eq? (syntax-e form) '...) + (unless (or (and skip-id + (free-identifier=? skip-id form)) + (eq? (syntax-e form) '...) (eq? (syntax-e form) '...+) (eq? (syntax-e form) 'code:line) (eq? (syntax-e form) 'code:blank)