diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-27 07:29:21 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-27 07:29:21 -0800 |
commit | ecc3981b8bdee6db1571edea88e55211d8dc0390 (patch) | |
tree | fb8451562f14ec95a91e59864a159a36ed399db9 /lib.c | |
parent | d3ec00fccdb41291b0c884c4074bd7c6232a3db3 (diff) | |
download | txr-ecc3981b8bdee6db1571edea88e55211d8dc0390.tar.gz txr-ecc3981b8bdee6db1571edea88e55211d8dc0390.tar.bz2 txr-ecc3981b8bdee6db1571edea88e55211d8dc0390.zip |
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).
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |