summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--struct.c5
-rw-r--r--txr.118
2 files changed, 19 insertions, 4 deletions
diff --git a/struct.c b/struct.c
index 91e6807c..af2bdaaf 100644
--- a/struct.c
+++ b/struct.c
@@ -1316,9 +1316,8 @@ static void struct_inst_print(val obj, val out, val pretty,
if (!nullocp(ptr)) {
if (compat)
funcall2(deref(ptr), obj, out);
- else
- funcall3(deref(ptr), obj, out, pretty);
- return;
+ else if (funcall3(deref(ptr), obj, out, pretty) != colon_k)
+ return;
}
}
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