diff --git a/collects/racket/sandbox.rkt b/collects/racket/sandbox.rkt index b4097773c5..3bc3e80da1 100644 --- a/collects/racket/sandbox.rkt +++ b/collects/racket/sandbox.rkt @@ -503,6 +503,12 @@ (define (add-location x loc) (cond [(null? x) null] + [(list? x) + ;; For a list, generate a syntax-object wrapper consistent with + ;; an absence of `.'s in the reader's input: + (make-orig (for/list ([i (in-list x)]) + (add-location i loc)) + loc)] [(pair? x) (make-orig (cons (add-location (car x) loc) (add-location (cdr x) loc)) loc)] diff --git a/collects/tests/scribble/docs/stxobj.scrbl b/collects/tests/scribble/docs/stxobj.scrbl new file mode 100644 index 0000000000..330cdfb3b5 --- /dev/null +++ b/collects/tests/scribble/docs/stxobj.scrbl @@ -0,0 +1,6 @@ +#lang scribble/manual +@(require scribble/eval) + +@interaction[ +(syntax-e #'(+ 1 2)) +] diff --git a/collects/tests/scribble/docs/stxobj.txt b/collects/tests/scribble/docs/stxobj.txt new file mode 100644 index 0000000000..bab5ef768a --- /dev/null +++ b/collects/tests/scribble/docs/stxobj.txt @@ -0,0 +1,2 @@ + > (syntax-e #'(+ 1 2)) + '(# # #)