Status: Accepted
Owner: ----
Labels: Type-Documentation
New issue 3993 by [email protected]: undocument make-simple-closure
http://code.google.com/p/lilypond/issues/detail?id=3993
The example of make-simple-closure at
http://www.lilypond.org/doc/v2.19/Documentation/extending/callback-functions
might become out-dated with the patch for issue 2245
There seems to be no need to document make-simple-closure in 'extending'.
The example could be more simply written as
\override Grob.X-offset = #(lambda (g)
(+ (ly:break-alignable-interface::self-align-callback g)
(ly:self-alignment-interface::x-aligned-on-self g)))
and an example for a function with a second argument as
\override Grob.X-offset = #(lambda (g)
(ly:side-position-interface::x-aligned-side grob 2.5))
The introduction of make-simple-closure in commit
9106e3bd374198c5457c35181ae1d66b3ec95236 does not use it from Scheme, but
uses it in C to generate a Scheme closure. For the 'extending' guide,
Scheme's lambda seems better.
In 'define-grobs.scm' anonymous functions (lambdas) are not used in grob
definitions
<http://lists.gnu.org/archive/html/lilypond-devel/2013-11/msg00254.html>
but named functions seem always better than make-simple-closure.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings