Author: yamakenz
Date: Sun Sep 16 00:17:47 2007
New Revision: 4966

Modified:
   trunk/doc/COMPATIBILITY
   trunk/scm/custom-rt.scm

Log:
* scm/custom-rt.scm
  - (custom-update-group-conf-freshness, custom-group-conf-updated?):
    Add exception handling around file-mtime to follow the
    specification change of file-mtime in r4915. Thanks Etsushi ([uim-ja 60])
* doc/COMPATIBILITY
  - Update "Specification changes of utility procedures" for file-mtime


Modified: trunk/doc/COMPATIBILITY
==============================================================================
--- trunk/doc/COMPATIBILITY     (original)
+++ trunk/doc/COMPATIBILITY     Sun Sep 16 00:17:47 2007
@@ -229,8 +229,8 @@
 Affects: uim developers, IM developers
 Updates: Scheme API
 Version: 1.5.0
-Revision: ac4693, ac4694, ac4698, ac4699, ac4703
-Date: 2007-07-11
+Revision: ac4693, ac4694, ac4698, ac4699, ac4703, ac4915
+Date: 2007-07-11, 2007-09-16
 Modifier: YamaKen
 Related: 
 URL:
@@ -241,6 +241,7 @@
   (changed) string-join
   (changed) sublist
   (changed) sublist-rel
+  (changed) file-mtime
 Description:
   - 'join' has been replaced with 'list-join'. The args are swapped
   - Now string-split produces empty strings as follows. See
@@ -256,6 +257,8 @@
                (sublist-rel '(1) 0 0)  ==> (1)
       uim 1.5: (sublist     '(1) 0 0)  ==> ()
                (sublist-rel '(1) 0 0)  ==> ()
+  - file-mtime has been changed as raising an error instead of
+    returning #f if stat(3) is failed
 ------------------------------------------------------------------------------
 Summary: SRFI-1 procedures replacement
 Affects: uim developers, IM developers

Modified: trunk/scm/custom-rt.scm
==============================================================================
--- trunk/scm/custom-rt.scm     (original)
+++ trunk/scm/custom-rt.scm     Sun Sep 16 00:17:47 2007
@@ -72,7 +72,9 @@
 ;; experimental
 (define custom-update-group-conf-freshness
   (lambda (gsym)
-    (let ((mtime (file-mtime (custom-file-path gsym))))
+    (let ((mtime (guard (err
+                        (else #f))
+                  (file-mtime (custom-file-path gsym)))))
       (set! custom-group-conf-freshnesses
            (alist-replace (cons gsym mtime)
                           custom-group-conf-freshnesses))
@@ -83,8 +85,10 @@
   (lambda (gsym)
     (let ((prev-mtime (assq-cdr gsym custom-group-conf-freshnesses)))
       (or (not prev-mtime)
-         (not (= (file-mtime (custom-file-path gsym))
-                 prev-mtime))))))
+         (guard (err
+                 (else #f))
+           (not (= (file-mtime (custom-file-path gsym))
+                   prev-mtime)))))))
 
 ;; experimental
 (define custom-load-updated-group-conf

Reply via email to