Next: Known Names, Up: Reflection
To use documentation procedures, evaluate the form:
(use-modules (ice-9 documentation))
Return documentation for name (a symbol) if found in files. If files is not specified, use
documentation-files.
A list of filenames. Used by
search-documentation-files.
* Guile Documentation Format Here is the complete and authoritative documentation for the Guile Documentation Format Version 1: HEADER ^L (PROC1 PROC1-ARGS ...) DOCUMENTATION1 ^A[FILE:LINE] ^L (PROC2 PROC2-ARGS ...) DOCUMENTATION2 ^A[FILE:LINE] ^L... The HEADER is completely ignored. The "^L" is a formfeed on a line of its own (recognizable by "\f\n"). PROC1, PROC2 and so on are symbols that name the element documented. Likewise, PROC1-ARGS and so on are components of the arglist, for the most part symbols, but also including the tokens "[", "]" and "...". If the arglist ends with a vector #(REQ OPT VAR), then REQ, OPT, and VAR are integers specifying the C-level counts of required, optional and variable args. No such vector means all args are required. DOCUMENTATION1, DOCUMENTATION2 and so on are the related documentation, which may span several lines. The "^A" is a control-A (#\soh) at the beginning of a line immediately followed by a left square bracket, the name of the source file, a colon, a line number, a right square bracket and finally a newline.
Return the commentary extracted from filename, or an empty string. Normally, a file's commentary has the form:
;;; Commentary: ;; This text, sans leading semicolons, ;; is what is normally extracted. ;;; Code:Optional second arg start is a regexp that overrides the default
"^;;; Commentary:". Optional third arg stop is a regexp that overrides the default"^;;; Code:". These args may also be a compiled regexp, as returned bymake-regexp, or #t to mean to use the default. Lines matched by start and stop are excluded from the return value.Optional fourth arg scrub is a procedure that takes a single line and returns a new "clean" line. These lines are concatenated in order to form the return value. The default scrub procedure simply eliminates leading semicolons (optionally) followed by a single space char from its input line.