fix some minor bug and typos in previous commit
svn: r8533
This commit is contained in:
parent
3c72e71e24
commit
3da233dd8e
|
@ -1,3 +1,3 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define name "Framework"))
|
||||
(define name "Framework")
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define name "Parser-tools"))
|
||||
(define name "Parser-tools")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define name "Scribblings: GUI")
|
||||
(define scribblings '(("gui.scrbl" (multi-page)))))
|
||||
(define scribblings '(("gui.scrbl" (multi-page))))
|
||||
|
|
|
@ -122,7 +122,7 @@ For example, the @filepath{info.ss} file in the @filepath{sirmail} collection
|
|||
might contain the following @scheme[info] declaration:
|
||||
|
||||
@schemeblock[
|
||||
#lang setup/infotab
|
||||
\#lang setup/infotab
|
||||
(define name "SirMail")
|
||||
(define mred-launcher-libraries (list "sirmail.ss"))
|
||||
(define mred-launcher-names (list "SirMail"))
|
||||
|
|
|
@ -45,10 +45,10 @@ grammar of @scheme[_info-module]:
|
|||
For example, the following declaration could be the @filepath{info.ss}
|
||||
library of the @filepath{help} collection. It contains definitions for
|
||||
three info tags, @scheme[name], @scheme[mzscheme-launcher-libraries], and
|
||||
@scheme[mzscheme-launcher-names]. (Note the use of #lang!!!!!!)
|
||||
@scheme[mzscheme-launcher-names]. (Note the use of @litchar{#lang}.)
|
||||
|
||||
@schemeblock[
|
||||
#lang setup/infotab
|
||||
\#lang setup/infotab
|
||||
(define name "Help")
|
||||
(define mzscheme-launcher-libraries '("help.ss"))
|
||||
(define mzscheme-launcher-names '("PLT Help"))
|
||||
|
|
|
@ -60,7 +60,7 @@ EOS
|
|||
@filepath{info.ss} module, here's a suitable complete module:
|
||||
|
||||
@schemeblock[
|
||||
#lang setup/infotab
|
||||
\#lang setup/infotab
|
||||
(define name "Some documentation")
|
||||
(define scribblings '(("manual.scrbl" ())))
|
||||
]}
|
||||
|
|
|
@ -153,7 +153,7 @@ DrScheme continues to start up, without the tool.
|
|||
For example, if the @File{info.ss} file in a collection
|
||||
contains:
|
||||
@schemeblock[
|
||||
#lang setup/infotab
|
||||
\#lang setup/infotab
|
||||
(define name "Tool Name")
|
||||
(define tools (list (list "tool.ss")))
|
||||
]
|
||||
|
@ -259,7 +259,7 @@ The lists must have the same length.
|
|||
As an example, the @italic{Essentials of Programming Languages}
|
||||
language specification's @File{info.ss} looks like this:
|
||||
@schemeblock[
|
||||
#lang setup/infotab
|
||||
\#lang setup/infotab
|
||||
(require string-constants/string-constant)
|
||||
(define name "EoPL Support")
|
||||
(define drscheme-language-modules
|
||||
|
|
|
@ -16,28 +16,32 @@
|
|||
;; get-info/full : path -> info/#f
|
||||
(define (get-info/full dir)
|
||||
(define file (build-path dir "info.ss"))
|
||||
(define (err fmt . args)
|
||||
(apply error 'get-info (string-append "info file " fmt " in ~a")
|
||||
(append args (list file))))
|
||||
(define (contents)
|
||||
(with-input-from-file file
|
||||
(lambda ()
|
||||
(begin0 (read)
|
||||
(unless (eof-object? (read))
|
||||
(error "info file has multiple expressions in ~a" file))))))
|
||||
(parameterize ([read-accept-reader #t]
|
||||
[current-reader-guard
|
||||
(lambda (x)
|
||||
(if (eq? x 'setup/infotab/lang/reader)
|
||||
x
|
||||
(err "has illegal #lang or #reader"))
|
||||
x)])
|
||||
(with-input-from-file file
|
||||
(lambda ()
|
||||
(begin0 (read)
|
||||
(unless (eof-object? (read))
|
||||
(err "has multiple expressions" file)))))))
|
||||
(and (file-exists? file)
|
||||
(parameterize ([read-accept-reader #t]
|
||||
[current-reader-guard
|
||||
(lambda (x)
|
||||
(if (equal? x 'setup/infotab/lang/reader)
|
||||
x
|
||||
(error "info file has illegal #lang or #reader in ~a" file))
|
||||
x)])
|
||||
(match (contents)
|
||||
[(list 'module 'info
|
||||
(or '(lib "infotab.ss" "setup") 'setup/infotab)
|
||||
expr ...)
|
||||
(dynamic-require file '#%info-lookup)]
|
||||
[else (error 'get-info
|
||||
"info file does not contain a module of the right shape: \"~a\""
|
||||
file)]))))
|
||||
(match (contents)
|
||||
[(list 'module 'info
|
||||
(or '(lib "infotab.ss" "setup") 'setup/infotab)
|
||||
expr ...)
|
||||
;; no need to set a reader-guard, since we checked it
|
||||
;; above (a guard will see other uses of #lang for stuff
|
||||
;; that is required)
|
||||
(dynamic-require file '#%info-lookup)]
|
||||
[else (err "does not contain a module of the right shape")])))
|
||||
|
||||
;; directory-record = (make-directory-record nat nat key path (listof symbol))
|
||||
;; eg: (make-directory-record 1 0 '(lib "mzlib") #"mzlib" '(name))
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define name "XML private"))
|
||||
(define name "XML private")
|
||||
|
|
Loading…
Reference in New Issue
Block a user