summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-24 16:06:47 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-24 16:06:47 -0800
commit3fdecca05ea781c592d5acf0c3610f3a2be31706 (patch)
treec1f418de2b697ef64cffbd5c8c45adca80797cbf /txr.1
parent96bb428fb9d47b332f5c2e979af76e8c2ee75d0e (diff)
downloadtxr-3fdecca05ea781c592d5acf0c3610f3a2be31706.tar.gz
txr-3fdecca05ea781c592d5acf0c3610f3a2be31706.tar.bz2
txr-3fdecca05ea781c592d5acf0c3610f3a2be31706.zip
* debug.c (debug): Use new way of getting line number.
* eval.c (eval_error): Use source_loc_str to get source location. * match.c (debuglf, sem_err, file_err): Likewise. * parser.h (source_loc_str): Declared. * parser.l (parse_init): form_to_ln_hash must be equal based now. * parser.y (rl): Store new form of read-time source location info. * txr.1: Documented load.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.118
1 files changed, 18 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 187d0956..beb6209b 100644
--- a/txr.1
+++ b/txr.1
@@ -1272,6 +1272,9 @@ as a filter. See Function Filters below.
The filter directive passes one or more variables through a given
filter or chain or filters, updating them with the filtered values.
+.IP @(load)
+The load directive loads another TXR file and interprets its contents.
+
.PP
.SS The Next Directive
@@ -3822,6 +3825,21 @@ Example: convert a, b, and c to upper case and HTML encode:
@(filter (:upcase :to_html) a b c)
+.SS The Load Directive
+
+The syntx of the load directive is:
+
+ @(load EXPR)
+
+Where EXPR evaluates to a string giving the path of the file to load.
+Unless the path is absolute, it is interpreted relative to the directory of the
+source file from which the @(load) form was read. If there was no such
+source file (for instance, the script was read from standard input),
+then it is resolved relative to the current working directory.
+
+Loading is performed at evaluation time; it is not a source file inclusion
+mechanism. A TXR script is read from beginning to end and parsed prior to
+being evaluated.
.SH EXCEPTIONS