Using detectable optional args.

This commit is contained in:
Alex Shinn 2013-08-04 17:01:51 +09:00
parent e136aa78e2
commit 1e59b80a53

View file

@ -252,9 +252,10 @@
;;> Extends the config with anadditional alist. ;;> Extends the config with anadditional alist.
(define (conf-extend config alist . o) (define (conf-extend config alist . o)
(let ((source (and (pair? o) (car o))))
(if (pair? alist) (if (pair? alist)
(make-conf alist config (and (pair? o) (car o)) (current-second)) (make-conf alist config source (current-second))
config)) config)))
;;> Joins two configs. ;;> Joins two configs.
@ -450,9 +451,7 @@
(else (conf-verify-match (cadr def) cell warn))))))) (else (conf-verify-match (cadr def) cell warn)))))))
(define (conf-verify spec config . o) (define (conf-verify spec config . o)
(let ((warn (if (pair? o) (let ((warn (if (pair? o) (car o) conf-default-warn)))
(lambda args (apply (car o) args) #f)
conf-default-warn)))
(let lp ((config config)) (let lp ((config config))
(cond (cond
(config (config