changed let&if to cond&=> in GET-SURFLET-RT-STRUCTURE

This commit is contained in:
interp 2003-03-03 10:29:18 +00:00
parent bd613946d0
commit f4baad5ab1
1 changed files with 10 additions and 8 deletions

View File

@ -473,20 +473,22 @@
(let ((full-surflet-name (absolute-file-name surflet-name directory))) (let ((full-surflet-name (absolute-file-name surflet-name directory)))
(if (options-cache-surflets?) (if (options-cache-surflets?)
(begin (begin
;; The lock is only obtained and released, if surflets are ;; The lock is only obtained and released, if surflets
;; cached. LOAD-SURFLET gets the CACHED? parameter, so ;; are cached. LOAD-SURFLET gets the CACHED? parameter,
;; nothing may happen, if in the meanwhile caching is turned ;; so nothing will happen, if in the meanwhile caching
;; off. ;; is turned off.
(obtain-lock *surflet-table-lock*) (obtain-lock *surflet-table-lock*)
(let ((surflet (table-ref *surflet-table* full-surflet-name))) (cond
(if surflet ((table-ref *surflet-table* full-surflet-name) =>
(lambda (surflet)
(if (equal? (file-last-mod full-surflet-name) (if (equal? (file-last-mod full-surflet-name)
(cdr surflet)) (cdr surflet))
(begin (begin
(release-lock *surflet-table-lock*) (release-lock *surflet-table-lock*)
(car surflet)) (car surflet))
(load-surflet full-surflet-name #t)) (load-surflet full-surflet-name #t))))
(load-surflet full-surflet-name #t)))) (else
(load-surflet full-surflet-name #t))))
(load-surflet full-surflet-name #f)))))) (load-surflet full-surflet-name #f))))))
;;; GET-LOADED-SURFLETS ;;; GET-LOADED-SURFLETS