summaryrefslogtreecommitdiffstats
path: root/genman.txr
diff options
context:
space:
mode:
authorPaul A. Patience <paul@apatience.com>2021-07-01 21:33:34 -0400
committerKaz Kylheku <kaz@kylheku.com>2021-07-01 21:33:34 -0400
commitb5d6ead3ee2bf101fd19c0fb5ddc6ccd253e2d57 (patch)
tree05c82ad6deeb73b59dacc1f7053971dffc951368 /genman.txr
parent6eee79c228000779c1b0eab5e67073ad1be83516 (diff)
downloadtxr-b5d6ead3ee2bf101fd19c0fb5ddc6ccd253e2d57.tar.gz
txr-b5d6ead3ee2bf101fd19c0fb5ddc6ccd253e2d57.tar.bz2
txr-b5d6ead3ee2bf101fd19c0fb5ddc6ccd253e2d57.zip
doc: check the contents of doc-syms.
* genman.txr: Before generating stdlib/doc-syms.tl, check that the symbols going into that file (i.e., into the doc-syms variable) are actually contained in the TXR image (allowing for some exceptions). Also, reindent some lines.
Diffstat (limited to 'genman.txr')
-rw-r--r--genman.txr25
1 files changed, 22 insertions, 3 deletions
diff --git a/genman.txr b/genman.txr
index 33ddf843..392b8524 100644
--- a/genman.txr
+++ b/genman.txr
@@ -298,14 +298,33 @@ function tocjump(hash) {
@(bind (name code) @(transpose [nsort (mapcar (tb ((sym code))
(list (html-decode sym) code))
(hash-pairs symhash)) : car]))
+@(do (let ((syms (append-each* ((entry [remove-if (op equal "pub")
+ (package-alist)
+ car])
+ (pkg-name [mapcar car entry])
+ (pkg [mapcar cdr entry]))
+ (let ((fn (casequal pkg-name
+ (("usr" "keyword") (fun tostringp))
+ (t (opip tostringp (join-with ":" pkg-name))))))
+ (mapcar fn (package-symbols pkg)))))
+ (ignames '("*-1" "*-2" "*-20"
+ "*0" "*1" "*2" "*99"
+ "*n" "*r" "*v"
+ "--args" "--eargs" "-C"
+ ".."
+ "TXR_COMPAT"
+ "buf-get-" "buf-put-")))
+ (mapdo (do unless (in syms @1)
+ (format *stderr* "~a: missing from image\n" @1))
+ (remove-if (op in ignames) name))))
@(output "stdlib/doc-syms.tl")
(defparml doc-syms
(hash-from-pairs
@ (repeat)
(@(tostring name) @(tostring code))
-@(first)
+@ (first)
'((@(tostring name) @(tostring code))
-@(last)
+@ (last)
(@(tostring name) @(tostring code)))))
-@ (end)
+@ (end)
@(end)