The interpreter's "report" command (,r) was a casualty of db2608b1f,
which causes `symbol->string' to fail when passed a keyword.

Update that code to use `keyword->string' and add a guard procedure to
the keyword-style parameter to ensure that it is always a keyword.
---
 csi.scm     | 2 +-
 library.scm | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/csi.scm b/csi.scm
index 17c6d1a1..20769369 100644
--- a/csi.scm
+++ b/csi.scm
@@ -508,7 +508,7 @@ EOF
                     (installation-repository)
                    (repository-path)
                    ##sys#include-pathnames
-                   (symbol->string (keyword-style))
+                   (keyword->string (keyword-style))
                    (shorten (vector-ref sinfo 0))
                    (shorten (vector-ref sinfo 1))
                    (vector-ref sinfo 2)
diff --git a/library.scm b/library.scm
index b7d0c10e..4c647c30 100644
--- a/library.scm
+++ b/library.scm
@@ -3677,10 +3677,12 @@ EOF
   (##sys#read-error port "invalid `#...' read syntax" n) )
 
 (set! chicken.base#case-sensitive (make-parameter #t))
-(set! chicken.base#keyword-style (make-parameter #:suffix))
 (set! chicken.base#parentheses-synonyms (make-parameter #t))
 (set! chicken.base#symbol-escape (make-parameter #t))
 
+(set! chicken.base#keyword-style
+  (make-parameter #:suffix (lambda (x) (##sys#check-keyword x 'keyword-style) 
x)))
+
 (define ##sys#current-read-table (make-parameter (##sys#make-structure 
'read-table #f #f #f)))
 
 (define ##sys#read-warning
-- 
2.21.0


_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to