diff --git a/undone/main.scm b/undone/main.scm index e916ad2..8804bde 100644 --- a/undone/main.scm +++ b/undone/main.scm @@ -5,7 +5,7 @@ (define-syntax define-view (lambda (x) - (syntax-case x (with) + (syntax-case x () ((_ name doc fmt fields fields* ...) (with-syntax ((viewname (datum->syntax @@ -14,11 +14,13 @@ (define (viewname) doc (map (lambda (item) + (let (#,@(map (lambda (field) + #`(#,field (cdr (assq (quote #,field) item)))) + #'(fields fields* ...))) (format #t fmt - #,@(map - (lambda (field) - #`(cdr (assq (quote #,field) item))) - #'(fields fields* ...)))) + #,@(map (lambda (field) + field) + #'(fields fields* ...))))) todo-list)) (set! view-list (append view-list