(require 'top-refs)
These procedures complement those in Module Manifests by
finding the top-level variable references in Scheme source code.
They work by traversing expressions and definitions, keeping track
of bindings encountered. It is certainly possible to foil these
functions, but they return useful information about SLIB source
code.
Returns a list of the top-level variables referenced by the Scheme expression obj.
filename should be a string naming an existing file containing Scheme source code.
top-refs<-filereturns a list of the top-level variable references made by expressions in the file named by filename.Code in modules which filename
requires is not traversed. Code in files loaded from top-level is traversed if the expression argument toload,slib:load,slib:load-source,macro:load,defmacro:load,synclo:load,syncase:load, ormacwork:loadis a literal string constant or composed of combinations of vicinity functions and string literal constants; and the resulting file exists (possibly with ".scm" appended).
The following function parses an Info Index. 1
n ... must be an increasing series of positive integers.
exports<-info-indexreturns a list of all the identifiers appearing in the nth ... (info) indexes of file. The identifiers have the case that the implementation'sreaduses for symbols. Identifiers containing spaces (eg.close-base on base-table) are not included. #f is returned if the index is not found.Each info index is headed by a ‘* Menu:’ line. To list the symbols in the first and third info indexes do:
(exports<-info-index "slib.info" 1 3)
[1] Although it will work on large info files, feeding it an excerpt is much faster; and has less chance of being confused by unusual text in the info file. This command excerpts the SLIB index into slib-index.info:
info -f slib2d6.info -n "Index" -o slib-index.info