From bf7bc911ddac5ebc649a69555e5549e4eb7fc46a Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 9 Oct 1998 15:12:51 +0000 Subject: [PATCH] * boot-9.scm (read-path-list-notation-warning): New function: print a warning the first time we see `#/' notation. --- ice-9/boot-9.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index a060f3d0d..5dc81a917 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -1022,6 +1022,21 @@ (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) @@ -1044,7 +1059,7 @@ ;; 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))