From 1e59b80a538e542b56e9303f12bed438f00a3cec Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 4 Aug 2013 17:01:51 +0900 Subject: [PATCH] Using detectable optional args. --- lib/chibi/config.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/chibi/config.scm b/lib/chibi/config.scm index a3ebd30e..75e94bca 100644 --- a/lib/chibi/config.scm +++ b/lib/chibi/config.scm @@ -252,9 +252,10 @@ ;;> Extends the config with anadditional alist. (define (conf-extend config alist . o) - (if (pair? alist) - (make-conf alist config (and (pair? o) (car o)) (current-second)) - config)) + (let ((source (and (pair? o) (car o)))) + (if (pair? alist) + (make-conf alist config source (current-second)) + config))) ;;> Joins two configs. @@ -450,9 +451,7 @@ (else (conf-verify-match (cadr def) cell warn))))))) (define (conf-verify spec config . o) - (let ((warn (if (pair? o) - (lambda args (apply (car o) args) #f) - conf-default-warn))) + (let ((warn (if (pair? o) (car o) conf-default-warn))) (let lp ((config config)) (cond (config