summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.126
1 files changed, 26 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 86877df4..808c7c9d 100644
--- a/txr.1
+++ b/txr.1
@@ -4225,6 +4225,10 @@ of the variable a.
Note that TXR Lisp does not have a distinct quote and backquote syntax.
There is only one quote, which supports unquoting.
+A quoted form which contains no unquotes codifies an ordinary quote.
+
+A quoted form which contains unquotes expresses a quasiquote.
+
.IP ,form
Thes comma character is used within a quoted list to denote an unquote. Wheras
@@ -4241,6 +4245,28 @@ the form which follows ,* must evaluate to a list. That list is spliced into
the quoted list. For example: '(a b c ,*(list (+ 3 3) (+ 4 4) d) evaluates
to (a b c 6 8 d). The expression (list (+ 3 3) (+ 4 4)) is evaluated
to produce the list (6 8), and this list is spliced into the quoted template.
+
+.IP ,'form
+
+The comma-quote combination has a special meaning: the quote always
+behaves as a regular quote and not a quasiquote, even if form contains
+unquotes. Therefore, it does not "capture" these unquotes: they cannot
+"belong" to this quote. The comma and quote "cancel out", so the only effect
+of comma-quote is to add one level of unquoting. So for instance, whereas in
+'(a b c '(,d)), the subsitution of d belongs to the inner quote (it is unquoted
+by the leftmost comma which belongs to the innermost quote) by contrast,
+in '(a b c '(,',d)) the d is now one comma removed from the leftmost comma and
+thus the substitution of d belongs to the outer quote.
+In other dialects of Lisp, this would be written `(a b c `(,',d)), making it
+explicit which kind of quote is being specified. TXR Lisp works out which
+kind of quote to use internally.
+
+.IP ,*'form
+
+The comma-splice form is analogous to comma-quote (see above). Like in the
+,' combination, in the ,*' combination, the quote behaves as a regular quote
+and not a quasiquote.
+
.PP
.SS Nested Quotes