Squashing more bugs for weird symbol names.

        * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
        and #{.}# specially.

This is still not complete, though.  There are still problem cases
like #{0.0}#, #{-i}#, etc.  Rather than trying to duplicate all the
number-detection logic from scm_lreadr, maybe it would be best to
handle just the few non-numeric special cases, and then try
scm_i_mem2number(); if that returns non-#f, treat the symbol name as
weird.  I'll work on a patch.


paul
Index: guile-core/libguile/print.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/print.c,v
retrieving revision 1.157
diff -u -r1.157 print.c
--- guile-core/libguile/print.c	30 Nov 2003 00:57:14 -0000	1.157
+++ guile-core/libguile/print.c	2 Dec 2003 00:39:33 -0000
@@ -324,7 +324,8 @@
    * name we've looked at so far. */
   int all_digits = 1;
 
-  if (len == 0 || str[0] == '\'' || str[0] == ':' || str[len-1] == ':')
+  if (len == 0 || str[0] == '\'' || str[0] == '`' || str[0] == ',' ||
+      str[0] == ':' || str[len-1] == ':' || (str[0] == '.' && len == 1))
     {
       scm_lfwrite ("#{", 2, port);
       weird = 1;
_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile

Reply via email to