From ecc3981b8bdee6db1571edea88e55211d8dc0390 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 27 Nov 2016 07:29:21 -0800 Subject: bugfix: read-print consistency for @(expr). * lib.c (obj_print_impl): Only print (sys:expr x . rest) as @x if rest is nil, and x is a cons. Otherwise we create read-print problems: (sys:expr x y) prints as @x, concealing y. And (sys:expr sym) prints as @sym which reads as (sys:var sym). --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 2b1be171..299263e6 100644 --- a/lib.c +++ b/lib.c @@ -9557,7 +9557,7 @@ val obj_print_impl(val obj, val out, val pretty, struct strm_ctx *ctx) { put_char(chr('@'), out); obj_print_impl(second(obj), out, pretty, ctx); - } else if (sym == expr_s) { + } else if (sym == expr_s && two_elem && consp(second(obj))) { put_char(chr('@'), out); obj_print_impl(second(obj), out, pretty, ctx); } else if (sym == rcons_s && consp(cdr(obj)) -- cgit v1.2.3