From b5d6ead3ee2bf101fd19c0fb5ddc6ccd253e2d57 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Thu, 1 Jul 2021 21:33:34 -0400 Subject: 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. --- genman.txr | 25 ++++++++++++++++++++++--- stdlib/doc-syms.tl | 2 +- 2 files changed, 23 insertions(+), 4 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) diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl index 1df28d8e..ed817076 100644 --- a/stdlib/doc-syms.tl +++ b/stdlib/doc-syms.tl @@ -727,7 +727,7 @@ ("filter-equal" "N-03136087") ("filter-string-tree" "N-00C9EEB0") ("finalize" "N-01230613") - ("finally" "D-0079") + ("finally" "D-0078") ("find" "N-00C9DFF6") ("find-frame" "N-02B97226") ("find-frames" "N-02B97226") -- cgit v1.2.3