summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-03-13 06:41:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-03-13 06:41:26 -0700
commit398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4 (patch)
tree3ce17cae7b9dbea916a78d32f23cd5ef0567c4f0 /txr.1
parent2e99d6d842d4714a2b165b1ae3920013467e03f7 (diff)
downloadtxr-398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4.tar.gz
txr-398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4.tar.bz2
txr-398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4.zip
Add in-package directive.
* match.c (in_package_s): New symbol variable. (syms_init): Initialize in_package_s. * match.h (in_package_s): Declared. * parser.y (check_parse_time_action): Add case for in-package. Evaluate just with eval, as a case of the in-package macro. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.134
1 files changed, 34 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 50bb99c2..98c0f37b 100644
--- a/txr.1
+++ b/txr.1
@@ -3276,6 +3276,12 @@ The
directive evaluates \*(TL expressions immediately, during the parsing
of the \*(TX syntax in which it occurs.
+.coIP @(in-package)
+The
+.code in-package
+directive is used to switch to a different symbol package.
+It mirrors the \*(TL macro of the same name.
+
.PP
.SS* Subexpression Evaluation
@@ -6580,6 +6586,34 @@ can be used as a horizontal or vertical directive, whereas
.code mdo
is only vertical.
+.dir in-package
+
+The
+.code in-package
+directive shares the same syntax and semantics as the \*(TL macro
+of the same name:
+
+.cblk
+.mets (in-package << name )
+.cble
+
+The
+.code in-package
+directive is evaluated immediately upon being parsed,
+leaving no trace in the syntax tree of the surrounding \*(TX
+query.
+
+It causes the
+.code *package*
+special variable to take on the package denoted by
+.metn name .
+
+The directive that
+.meta name
+is either a string or symbol. An error exception is thrown if
+this isn't the case. Otherwise it searches for the package.
+If the package is not found, an error exception is thrown.
+
.SS* Blocks
.NP* Overview