diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-10 18:57:38 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-10 18:57:38 -0800 |
commit | 73368784f2c3d69a0fbc227420550b4b1e05d4ea (patch) | |
tree | ca792f1a22f50baca9eb8ef5f6a07e79877ce495 /lib.c | |
parent | e52438a4ff3e470863b3122cfd46a95c3a417516 (diff) | |
download | txr-73368784f2c3d69a0fbc227420550b4b1e05d4ea.tar.gz txr-73368784f2c3d69a0fbc227420550b4b1e05d4ea.tar.bz2 txr-73368784f2c3d69a0fbc227420550b4b1e05d4ea.zip |
Print (rcons x y) forms as x..y.
* lib.c (obj_print_impl): Handle rcons in same place
as other special syntax like sys:expr and quote.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -7685,6 +7685,12 @@ val obj_print_impl(val obj, val out, val pretty) } else if (sym == expr_s) { put_char(chr('@'), out); obj_print_impl(rest(obj), out, pretty); + } else if (sym == rcons_s && consp(cdr(obj)) + && consp(cddr(obj)) && !(cdddr(obj))) + { + obj_print_impl(second(obj), out, pretty); + put_string(lit(".."), out); + obj_print_impl(third(obj), out, pretty); } else { val iter; val closepar = chr(')'); |