[uim-commit] r1885 - branches/r5rs/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Wed Oct 26 13:02:19 PDT 2005


Author: yamaken
Date: 2005-10-26 13:02:16 -0700 (Wed, 26 Oct 2005)
New Revision: 1885

Modified:
   branches/r5rs/scm/util.scm
Log:
* scm/util.scm
  - (try-load, try-require): Resurrect the file existence check to
    suppress error message, lost in r1792


Modified: branches/r5rs/scm/util.scm
===================================================================
--- branches/r5rs/scm/util.scm	2005-10-26 19:59:51 UTC (rev 1884)
+++ branches/r5rs/scm/util.scm	2005-10-26 20:02:16 UTC (rev 1885)
@@ -551,7 +551,9 @@
     (guard (err
 	    (else
 	     #f))
-      (load file))))
+      ;; to suppress error message, check file existence first
+      (and (file-readable? (make-scm-pathname file))
+	   (load file)))))
 
 ;; TODO: write test
 ;; returns succeeded or not
@@ -560,7 +562,9 @@
     (guard (err
 	    (else
 	     #f))
-      (require file))))
+      ;; to suppress error message, check file existence first
+      (and (file-readable? (make-scm-pathname file))
+	   (require file)))))
 
 ;; used for dynamic environment substitution of closure
 (define %%enclose-another-env



More information about the uim-commit mailing list