summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-03-13 06:58:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-03-13 06:58:26 -0700
commitbb0476aa11a6f4f24c16ddebcaf3917764655f45 (patch)
tree682b02af4c42be26a8537e431eb8cbeac110ed40 /txr.1
parent79c1412d63835304c6c219ab985ee32edf54d851 (diff)
downloadtxr-bb0476aa11a6f4f24c16ddebcaf3917764655f45.tar.gz
txr-bb0476aa11a6f4f24c16ddebcaf3917764655f45.tar.bz2
txr-bb0476aa11a6f4f24c16ddebcaf3917764655f45.zip
Print method can return : to decline printing.
* struct.c (struct_inst_print): Check return value of print method call. If it is the colon keyword, then do not return but rather continue to the regular struct printing code. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.118
1 files changed, 17 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 2cb25577..3ec80d72 100644
--- a/txr.1
+++ b/txr.1
@@ -24112,7 +24112,23 @@ is used.
The value returned by the
.code print
-method is ignored.
+method is significant. If the special keyword symbol
+.code :
+(colon) is returned, then the system will print the object
+in the default way, as if no
+.code print
+method existed: it is understood that the method declined
+the responsibility for printing the object.
+
+If any other value is returned, then it is understood
+that the method
+.code print
+method accepted the responsibility for printing the object,
+and the system consequently will generate into
+.meta stream
+any output output pertaining to
+.metn object 's
+representation.
.coNP Method @ lambda
.synb