summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-25 22:44:51 -0800
committerKaz Kylheku <kaz@kylheku.com>2018-11-25 22:44:51 -0800
commitf057a56f9dc8e2a4ad77ecf26f6cf114812bf389 (patch)
tree01ba43429e0fba74d9622bc1a5d6bbea83e7458a /lib.c
parent04947ade734e0787d30c15da004a2a1d71a59402 (diff)
downloadtxr-f057a56f9dc8e2a4ad77ecf26f6cf114812bf389.tar.gz
txr-f057a56f9dc8e2a4ad77ecf26f6cf114812bf389.tar.bz2
txr-f057a56f9dc8e2a4ad77ecf26f6cf114812bf389.zip
print: keep colon in keyword syms
* lib.c (obj_print_impl): Always include leading colon when printing keyword symbols, regardless of pretty flag. Subject to backward compatibility. * txr.1: Compat note added.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 3b9262b1..5a4eb3ad 100644
--- a/lib.c
+++ b/lib.c
@@ -11283,7 +11283,11 @@ dot:
}
break;
case SYM:
- if (!pretty) {
+ if (pretty) {
+ if (!opt_compat || opt_compat > 202)
+ if (obj->s.package == keyword_package)
+ put_char(chr(':'), out);
+ } else {
if (!obj->s.package) {
put_string(lit("#:"), out);
} else if (obj->s.package == keyword_package) {