summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b3c32d96..9a871517 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-27 Kaz Kylheku <kaz@kylheku.com>
+
+ * lib.c (obj_print, obj_pprint): Bugfix: there may be
+ additional expressions forms in (sys:var <sym>) after
+ the sym. These were not being printed. Such syntax occurs
+ often in the TXR pattern language.
+
2014-01-26 Kaz Kylheku <kaz@kylheku.com>
* regex.c (match_regex_right): New function.
diff --git a/lib.c b/lib.c
index 63d38183..ecabd77f 100644
--- a/lib.c
+++ b/lib.c
@@ -5049,7 +5049,7 @@ val obj_print(val obj, val out)
} else if (sym == splice_s) {
put_string(lit(",*"), out);
obj_print(second(obj), out);
- } else if (sym == var_s && symbolp(second(obj))) {
+ } else if (sym == var_s && symbolp(second(obj)) && !cdr(cdr(obj))) {
put_char(chr('@'), out);
obj_print(second(obj), out);
} else if (sym == expr_s) {
@@ -5214,7 +5214,7 @@ val obj_pprint(val obj, val out)
} else if (sym == splice_s) {
put_string(lit(",*"), out);
obj_pprint(second(obj), out);
- } else if (sym == var_s && symbolp(second(obj))) {
+ } else if (sym == var_s && symbolp(second(obj)) && !cdr(cdr(obj))) {
put_char(chr('@'), out);
obj_print(second(obj), out);
} else if (sym == expr_s) {