minor tweaks

svn: r1671
This commit is contained in:
Eli Barzilay 2005-12-23 09:14:25 +00:00
parent eceaabff9e
commit b087aa26ec
2 changed files with 9 additions and 5 deletions

View File

@ -1788,9 +1788,10 @@ expects a list of HTML objects as its first arguments (and again,
optionally more keywords/values). Finally, a convenient function is
`make-defined-htmls' -- when called (with no arguments or
keywords/values), it will go over all HTML objects in `*defined-htmls*',
collected by `defhtml' forms, and create their files. (Actually, it
will check `*defined-html*' once it is done, since more HTML objects may
be defined while creating pages.)
collected by `defhtml' forms, and create their files. Actually, it will
empty `*defined-htmls*', and recheck it once it is done, since more HTML
objects may be defined while creating pages. `*all-html*' contains all
html object and is never emptied.
The following example is a complete script that will create three HTML
files in the directory you run it from. (The evaluation delay trick

View File

@ -746,6 +746,7 @@
(defwrapper* ins: )
(defwrapper* del: )
(defwrapper* nobr: )
(defwrapper* nowrap: )
(defwrapper* big: )
(defwrapper* big~: recform: ::tag 'big: ::1st-args ::n)
@ -1097,8 +1098,10 @@
;; Website creation
(define* *defined-htmls* '())
(define* *all-htmls* '())
(define* (add-defined-html html)
(set! *defined-htmls* (cons html *defined-htmls*)))
(push! html *defined-htmls*)
(push! html *all-htmls*))
(defsyntax* (html-obj! stx)
(syntax-case stx ()
@ -1218,7 +1221,7 @@
[val (namespace-variable-value sym #f (lambda () #f))])
(if (and val (list? val) (getarg val :name))
val
(let loop ([hs *defined-htmls*])
(let loop ([hs *all-htmls*])
(and (pair? hs) (let ([name (getarg (car hs) :name)])
(if (or (equal? str name)
(equal? str (html-file-name name))