From d0f9ed697b7084655338c1791bbd424fa87762d2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 8 Jan 2013 16:20:08 -0700 Subject: [PATCH] scribble: add `+m' / `++main-xref-in' flag The `+m' flag is a long-overdue shorthand for `++xref-in setup/xref load-collections-xref', which links to installed documentation in the same way as DrRacket's "Scribble HTML" button. That is, use `+m' to link to installed documentation, scribble +m mine.scrbl instead of the previously recommended scribble ++xref-in setup/xref load-collections-xref mine.scrbl Merge to 5.3.2 original commit: 3e8b6b98663386ea01a93f917ed328e8052c38d8 --- collects/scribble/run.rkt | 8 ++++++-- collects/scribblings/scribble/running.scrbl | 18 +++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/collects/scribble/run.rkt b/collects/scribble/run.rkt index 752004de..7d116842 100644 --- a/collects/scribble/run.rkt +++ b/collects/scribble/run.rkt @@ -79,8 +79,12 @@ (current-redirect-main url)] [("--redirect") url "redirect external links to tag search via " (current-redirect url)] - [("++xref-in") module-path proc-id "load format-specific cross-ref info by" - "calling as exported by " + [("+m" "++main-xref-in") ("load format-speficic cross-ref info for" + "all installed library collections") + (current-xref-input-modules + (cons (cons 'setup/xref 'load-collections-xref) (current-xref-input-modules)))] + [("++xref-in") module-path proc-id ("load format-specific cross-ref info by" + "calling as exported by ") (let ([mod (read-one module-path)] [id (read-one proc-id)]) (unless (module-path? mod) diff --git a/collects/scribblings/scribble/running.scrbl b/collects/scribblings/scribble/running.scrbl index 4cb92533..74e94a1f 100644 --- a/collects/scribblings/scribble/running.scrbl +++ b/collects/scribblings/scribble/running.scrbl @@ -106,18 +106,22 @@ HTML-format information is usable for Latex (or PDF) or text rendering. A Racket installation includes HTML-format cross-reference information for all installed documentation. Each document's information is in a -separate file, so that loading all relevant files would be tedious. The -@DPFlag{xref-in} flag loads cross-reference information by calling a -specified module's function; in particular, the -@racketmodname[setup/xref] module provides -@racket[load-collections-xref] to load cross-reference information for -all installed documentation. Thus, +separate file, so that loading all relevant files would be tedious. +The @PFlag{m} or @DPFlag{main-xref-in} flag loads cross-reference +information for all installed documentation, so -@commandline{scribble ++xref-in setup/xref load-collections-xref mine.scrbl} +@commandline{scribble +m mine.scrbl} renders @filepath{mine.scrbl} to @filepath{mine.html} with cross-reference links to the Racket installation's documentation. +The @DPFlag{xref-in} flag loads cross-reference information by calling +a specified module's function. The @racketmodname[setup/xref] module +provides @racket[load-collections-xref] to load cross-reference +information for all installed documentation, and @PFlag{m} or +@DPFlag{main-xref-in} is just a shorthand for @exec{++xref-in +setup/xref load-collections-xref}. + The @DFlag{redirect-main} flag redirects links to the local installation's documentation to a given URL, such as @tt{http://docs.racket-lang.org/}. Beware that documentation links