diff --git a/collects/scribblings/reference/reader.scrbl b/collects/scribblings/reference/reader.scrbl index fc52347b01..be45e357ac 100644 --- a/collects/scribblings/reference/reader.scrbl +++ b/collects/scribblings/reference/reader.scrbl @@ -877,10 +877,15 @@ _form ... is equivalent to @racketblock[ -(module _name _module-path +(module _name-id _module-path _form ...) ] +where @racket[_name-id] is derived from the source input port's name: +if the port name is a filename path, the filename without its +directory path and extension is used for @racket[_name-in], otherwise +@racket[_name-id] is @racket[anonymous-module]. + @subsection{Chaining Reader Language} @defmodulelang[reader] diff --git a/collects/syntax/scribblings/module-reader.scrbl b/collects/syntax/scribblings/module-reader.scrbl index 8f76c28269..2995024f54 100644 --- a/collects/syntax/scribblings/module-reader.scrbl +++ b/collects/syntax/scribblings/module-reader.scrbl @@ -78,6 +78,11 @@ is read as (#%module-begin ....)) ] +where @racket[_name-id] is derived from the source input port's name: +if the port name is a filename path, the filename without its +directory path and extension is used for @racket[_name-in], otherwise +@racket[_name-id] is @racket[anonymous-module]. + Keyword-based @racket[reader-option]s allow further customization, as listed below. Additional @racket[form]s are as in the body of @racket[scheme/base] module; they can import bindings and define @@ -401,9 +406,10 @@ various keywords to arbitrary readers; please use it instead.} Repeatedly calls @racket[read] on @racket[in] until an end of file, collecting the results in order into @racket[_lst], and derives a -@racket[_name-id] from @racket[(object-name in)]. The last five -arguments are used to construct the syntax object for the language -position of the module. The result is roughly +@racket[_name-id] from @racket[(object-name in)] in the same way as +@racketmodname[syntax/module-reader]. The last five arguments are +used to construct the syntax object for the language position of the +module. The result is roughly @racketblock[ `(module ,_name-id ,mod-path ,@_lst)