~ chicken-core (chicken-5) 863a28e3c26f2b665dcaf75d892fcb09f62c09a1


commit 863a28e3c26f2b665dcaf75d892fcb09f62c09a1
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Feb 12 22:38:45 2013 +0100
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Thu Feb 14 21:15:37 2013 +0100

    escape single backslash in symbols when printing
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/library.scm b/library.scm
index c53c884b..31e1e0c3 100644
--- a/library.scm
+++ b/library.scm
@@ -3167,7 +3167,7 @@ EOF
       (let ([csp (case-sensitive)]
 	    [ksp (keyword-style)]
 	    [length-limit (##sys#print-length-limit)]
-	    [special-characters '(#\( #\) #\, #\[ #\] #\{ #\} #\' #\" #\; #\ #\` #\|)] )
+	    [special-characters '(#\( #\) #\, #\[ #\] #\{ #\} #\' #\" #\; #\ #\` #\| #\\)] )
 
 	(define (outstr port str)
 	  (if length-limit
@@ -3224,8 +3224,7 @@ EOF
 	    (cond ((eq? len 0) #f)
 		  ((eq? len 1)
 		   (let ((c (##core#inline "C_subchar" str 0)))
-		     (cond ((or (eq? #\. c) (eq? #\# c) (eq? #\; c) (eq? #\, c) (eq? #\| c))
-			    #f)
+		     (cond ((or (eq? #\# c) (eq? #\. c)) #f)
 			   ((specialchar? c) #f)
 			   ((char-numeric? c) #f)
 			   (else #t))))
@@ -3235,8 +3234,8 @@ EOF
 			 (let ((c (##core#inline "C_subchar" str 0)))
 			   (cond ((or (char-numeric? c)
 				      (eq? c #\+)
-				      (eq? c #\-)
-				      (eq? c #\.) )
+				      (eq? c #\.)
+				      (eq? c #\-) )
 				  (not (##sys#string->number str)) )
 				 ((eq? c #\:) (not (eq? ksp #:prefix)))
 				 ((and (eq? c #\#)
Trap