~ chicken-core (chicken-5) ade82fc995987137f1c6876ab6ce98805629388c


commit ade82fc995987137f1c6876ab6ce98805629388c
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Fri Jan 18 19:03:43 2019 +0100
Commit:     Mario Domenech Goulart <mario@parenteses.org>
CommitDate: Fri Jan 18 19:14:47 2019 +0100

    Do not use ###text and ###append as if they were keywords
    
    After the change to drop qualified symbols, ###text no longer reads
    the same as #:text.  So the default modes for
    call-with-{input,output}-pipe and the comparison in
    open-{input,output}-file* for #:append no longer work.
    
    Reported by Mario Domenech Goulart
    
    Signed-off-by: Mario Domenech Goulart <mario@parenteses.org>

diff --git a/posix-common.scm b/posix-common.scm
index 0b675cea..bfd77941 100644
--- a/posix-common.scm
+++ b/posix-common.scm
@@ -448,11 +448,11 @@ EOF
 (let ()
   (define (mode inp m loc)
     (##sys#make-c-string
-     (cond [(pair? m)
+     (cond ((pair? m)
             (let ([m (car m)])
               (case m
-                [(###append) (if (not inp) "a" (##sys#error "invalid mode for input file" m))]
-                [else (##sys#error "invalid mode argument" m)] ) ) ]
+                ((#:append) (if (not inp) "a" (##sys#error "invalid mode for input file" m)))
+                (else (##sys#error "invalid mode argument" m)) ) ) )
            [inp "r"]
            [else "w"] )
      loc) )
@@ -707,7 +707,7 @@ EOF
 (set! chicken.process#pipe/buf _pipe_buf)
 
 (let ()
-  (define (mode arg) (if (pair? arg) (##sys#slot arg 0) '###text))
+  (define (mode arg) (if (pair? arg) (##sys#slot arg 0) #:text))
   (define (badmode m) (##sys#error "illegal input/output mode specifier" m))
   (define (check loc cmd inp r)
     (if (##sys#null-pointer? r)
Trap