From: Janek WarchoĊ‚ Date: Thu, 10 Jul 2014 19:59:56 +0000 (+0200) Subject: doc: update make-simple-closure example in Extending (Issue 3993) X-Git-Tag: release/2.19.10-1~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=625ee665b4b0ca9f584735a160d6b3ae6b3d163c;p=lilypond.git doc: update make-simple-closure example in Extending (Issue 3993) After improvements in Self_alignment_interface::aligned_on_parent (in particular after fixing issue 3254) it was possible to simplify default X-offset values for several grobs, so that they didn't have to use make-simple-closure (see e.g. commit 1d765020f8679958). This made an example in Extending 2.7 obsolete, so I'm replacing it with one that still uses make-simple-closure. --- diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index 85c0b3539b..e997085da3 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -1265,21 +1265,21 @@ can by found in the Internals Reference or the file 'define-grobs.scm': If routines with multiple arguments must be called, the current grob can be inserted with a grob closure. Here is a setting from -@code{AccidentalSuggestion}, +@code{RehearsalMark}, @example `(X-offset . - ,(ly:make-simple-closure - `(,+ + ,(ly:make-simple-closure + `(,+ ,(ly:make-simple-closure - (list ly:self-alignment-interface::centered-on-x-parent)) - ,(ly:make-simple-closure - (list ly:self-alignment-interface::x-aligned-on-self))))) + (list ly:break-alignable-interface::self-align-callback)) + ,(ly:make-simple-closure + (list ly:self-alignment-interface::x-aligned-on-self))))) @end example @noindent -In this example, both @code{ly:self-alignment-interface::x-aligned-on-self} and -@code{ly:self-alignment-interface::centered-on-x-parent} are called +In this example, both @code{ly:break-alignable-interface::self-align-callback} and +@code{ly:self-alignment-interface::x-aligned-on-self} are called with the grob as argument. The results are added with the @code{+} function. To ensure that this addition is properly executed, the whole thing is enclosed in @code{ly:make-simple-closure}.