[options] compact option-setter in generator

slightly more compact, avoids confusing structure whereby 'option' is
both the lambda's argument and the definition of argument.
This commit is contained in:
Christopher Lam 2019-04-11 23:18:46 +08:00
parent 6dd04cfa58
commit 6e246ef8ad

View File

@ -202,11 +202,9 @@ the option '~a'."))
(define (gnc:restore-form-generator value->string) (define (gnc:restore-form-generator value->string)
(lambda () (string-append (lambda ()
"(lambda (option) " (string-append "(lambda (o) (if o (gnc:option-set-value o "
"(if option ((gnc:option-setter option) " (value->string) ")))")))
(value->string)
")))")))
(define (gnc:value->string value) (define (gnc:value->string value)
(format #f "~s" value)) (format #f "~s" value))