Skip to content

Commit

Permalink
[options] compact option-setter in generator
Browse files Browse the repository at this point in the history
slightly more compact, avoids confusing structure whereby 'option' is
both the lambda's argument and the definition of argument.
  • Loading branch information
christopherlam committed May 3, 2019
1 parent 6dd04cf commit 6e246ef
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions libgnucash/app-utils/options.scm
Expand Up @@ -202,11 +202,9 @@ the option '~a'."))


(define (gnc:restore-form-generator value->string)
(lambda () (string-append
"(lambda (option) "
"(if option ((gnc:option-setter option) "
(value->string)
")))")))
(lambda ()
(string-append "(lambda (o) (if o (gnc:option-set-value o "
(value->string) ")))")))

(define (gnc:value->string value)
(format #f "~s" value))
Expand Down

0 comments on commit 6e246ef

Please sign in to comment.