commit 18e467ef9ea9061e83a6bc5bed14dd89c6b99543
parent 725f2bc9ed1664b80738f94ae460f1b12fbe1a12
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Fri, 14 Apr 2017 06:52:16 -0600
disable `_` prefix handling in `racketmodname` and other places
In places where module names are typeset, such as `racketmodname`,
there's no way to disable the special treatment of `_` as an
identifier prefix as in `racket`. Even using
`make-element-id-transformer` doesn't work, because the module-name
datum is explcitly disconnected from binding withing `racketmodname`.
Diffstat:
3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/scribble-doc/scribblings/scribble/manual.scrbl b/scribble-doc/scribblings/scribble/manual.scrbl
@@ -494,18 +494,22 @@ generates
#:grammar ([maybe-indirect code:blank
#:indirect])]{
-Like @racket[racket], but typeset as a module path. If @racket[datum]
-is an identifier or @racket[expr] produces a symbol, then it is
-hyperlinked to the module path's definition as created by
-@racket[defmodule].
+Like @racket[racket], but typeset as a module path and without special
+treatment of identifiers (such as @racketidfont{code:blank} or identifiers
+that start with @litchar{_}). If @racket[datum] is an identifier or
+@racket[expr] produces a symbol, then it is hyperlinked to the module
+path's definition as created by @racket[defmodule].
If @racket[#:indirect] is specified, then the hyperlink is given the
@racket['indirect-link] @tech{style property}, which makes the
hyperlink's resolution in HTML potentially delayed; see
-@racket['indirect-link] for @racket[link-element].}
+@racket['indirect-link] for @racket[link-element].
+
+@history[#:changed "1.21" @elem{Disabled @racket[racket]-style special
+ treatment of identifiers.}]}
@defform[(racketmodlink datum pre-content-expr ...)]{
-Like @racket[racketmod], but separating the module path to link
+Like @racket[racketmodname], but separating the module path to link
from the content to be linked. The @racket[datum] module path is always
linked, even if it is not an identifier.}
diff --git a/scribble-lib/info.rkt b/scribble-lib/info.rkt
@@ -23,4 +23,4 @@
(define pkg-authors '(mflatt eli))
-(define version "1.20")
+(define version "1.21")
diff --git a/scribble-lib/scribble/private/manual-scheme.rkt b/scribble-lib/scribble/private/manual-scheme.rkt
@@ -122,6 +122,8 @@
(make-element result-color (list (to-element/no-color s))))
(define (to-element/id s)
(make-element symbol-color (list (to-element/no-color s))))
+(define (to-element/no-escapes s)
+ (to-element s #:escapes? #f))
(define-syntax (keep-s-expr stx)
(syntax-case stx (quote)
@@ -160,7 +162,7 @@
(define-code RACKET to-element UNSYNTAX keep-s-expr add-sq-prop)
(define-code racketresult to-element/result unsyntax keep-s-expr add-sq-prop)
(define-code racketid to-element/id unsyntax keep-s-expr add-sq-prop)
-(define-code *racketmodname to-element unsyntax keep-s-expr add-sq-prop)
+(define-code *racketmodname to-element/no-escapes unsyntax keep-s-expr add-sq-prop)
(define-syntax (**racketmodname stx)
(syntax-case stx ()