summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-03 08:34:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-03 08:34:07 -0700
commit73d668988bb0ee6d4ed0d27064b0616f8d58adfd (patch)
tree754a876f8fcc30fc8d279fc27ef208f18c17fc72 /txr.1
parentde88f832f442dfdf6a9a23a4e8861e271a94ec28 (diff)
downloadtxr-73d668988bb0ee6d4ed0d27064b0616f8d58adfd.tar.gz
txr-73d668988bb0ee6d4ed0d27064b0616f8d58adfd.tar.bz2
txr-73d668988bb0ee6d4ed0d27064b0616f8d58adfd.zip
lib: new function for documentation lookup.
* genman.txr: dump contents of symhash into a doc-syms.tl library file, as a defvarl form. * lisplib.c (doc_instantiate, doc_set_entries): New static functions. (lisplib_init): Register autoload for doc-lookup module to symbols doc and *doc-url*. * share/txr/stdlib/doc-lookup.tl: New file. * share/txr/stdlib/doc-syms.tl: Likewise. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.148
1 files changed, 47 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 8448b35c..47f22895 100644
--- a/txr.1
+++ b/txr.1
@@ -77574,7 +77574,53 @@ The object
.code 4
is self-evaluating, and so the greedy evaluation process stops.
-.SS* Listener-Related Miscellanea
+.coNP Special variable @ *doc-url*
+.desc
+The special variable
+.code *doc-url*
+holds a character string representing a web URL intended to point to the HTML
+version of this document. The initial value points to the publicly hosted
+document on the Internet. The user may change this to point to another
+location, such as a locally hosted copy of the document.
+
+This variable is used by the
+.code doc
+function.
+
+.SS* Listener-Related Functions
+
+.coNP Function @ doc
+.synb
+.mets (doc << [ symbol ])
+.syne
+.desc
+The
+.code doc
+function provides help for the library symbol
+.metn symbol .
+If information about
+.meta symbol
+is available in the HTML version of this document, and is indexed, then this
+function causes that document to be opened using the system's default web
+browser, such that the browser navigates to the appropriate section of
+the manual.
+
+If the
+.meta symbol
+argument is omitted, then the document is opened without navigating to a
+particular section.
+
+The base URL for the document is configured by the
+.code *doc-url*
+variable.
+
+If
+.meta symbol
+is successfully found, or else not specified, and
+.code doc
+successfully invokes the URL-opening mechanism, it returns
+.codn t .
+Otherwise, it throws an error exception.
.coNP Function @ quip
.synb