summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-01-14 23:29:50 -0500
committerMark H Weaver <mhw@netris.org>2014-01-14 23:46:45 -0500
commit1fc651e3a5249fa35d143628d27243e96b90a0bd (patch)
tree23d54bf34af0e3bbea5ed24935a6a5141ae4151f /libguile/print.c
parent6e504a7b44a9a25787bdfb2d86fdddd3029f4ba9 (diff)
downloadguile-1fc651e3a5249fa35d143628d27243e96b90a0bd.tar.gz
print: In R7RS |...| symbols, print most graphic characters unescaped.
* libguile/print.c (print_r7rs_extended_symbol): Print any unicode graphic character other than '|' or '\' unescaped. Escape any spacing character other than ASCII space.
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 71bb89fde..ae98af405 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -462,8 +462,12 @@ print_r7rs_extended_symbol (SCM sym, SCM port)
case '\\': scm_lfwrite ("\\x5c;", 5, port); break;
default:
if (uc_is_general_category_withtable (c,
- SUBSEQUENT_IDENTIFIER_MASK
- | UC_CATEGORY_MASK_Zs))
+ UC_CATEGORY_MASK_L
+ | UC_CATEGORY_MASK_M
+ | UC_CATEGORY_MASK_N
+ | UC_CATEGORY_MASK_P
+ | UC_CATEGORY_MASK_S)
+ || (c == ' '))
{
if (!display_character (c, port, strategy))
scm_encoding_error ("print_r7rs_extended_symbol", errno,