* boot-9.scm (read-path-list-notation-warning): New function:
authorJim Blandy <jimb@red-bean.com>
Fri, 9 Oct 1998 15:12:51 +0000 (15:12 +0000)
committerJim Blandy <jimb@red-bean.com>
Fri, 9 Oct 1998 15:12:51 +0000 (15:12 +0000)
print a warning the first time we see `#/' notation.

ice-9/boot-9.scm

index a060f3d..5dc81a9 100644 (file)
              (loop (cons (read-component) reversed-path)))
            (reverse reversed-path))))))
 
+(define (read-path-list-notation-warning slash port)
+  (if (not (getenv "GUILE_HUSH"))
+      (begin
+       (display "warning: obsolete `#/' list notation read from "
+                (current-error-port))
+       (display (port-filename port) (current-error-port))
+       (display "; see guile-core/NEWS." (current-error-port))
+       (newline (current-error-port))
+       (display "         Set the GUILE_HUSH environment variable to disable this warning."
+                (current-error-port))
+       (newline (current-error-port))))
+  (read-hash-extend #\/ read-path-list-notation)
+  (read-path-list-notation slash port))
+
+
 (read-hash-extend #\' (lambda (c port)
                        (read port)))
 (read-hash-extend #\. (lambda (c port)
 
 ;; pushed to the beginning of the alist since it's used more than the
 ;; others at present.
-(read-hash-extend #\/ read-path-list-notation)
+(read-hash-extend #\/ read-path-list-notation-warning)
 
 (define (read:array digit port)
   (define chr0 (char->integer #\0))