From e6ef0a8d2c0ba80813af87a592e3629b9938a823 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 21 May 2015 15:27:25 +0200 Subject: [PATCH] Issue 4411: Omit unnecessary second argument to ly:make-unpure-pure-container, document this possibility --- Documentation/notation/changing-defaults.itely | 9 ++++++--- ly/music-functions-init.ly | 4 +--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index 7b974fbbb6..ffc80342ab 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -4573,9 +4573,12 @@ the accidentals. In the second measure, with unpure-pure containers, the spacing engine knows the width of the note heads and avoids the collision by lengthening the line accordingly. -Usually for simple calculations nearly-identical functions for both the -@q{unpure} and @q{pure} parts can be used, by only changing the number -of arguments passed to, and the scope of, the function. +Usually for simple calculations nearly-identical functions for +both the @q{unpure} and @q{pure} parts can be used, by only +changing the number of arguments passed to, and the scope of, the +function. This use case is frequent enough that +@code{ly:make-unpure-pure-container} constructs such a second +function by default when called with only one function argument. @warning{If a function is labeled as @q{pure} and it turns out not to be, the results can be unexpected.} diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 31e7a4d51f..74b054dc8c 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -511,9 +511,7 @@ given through @var{ratio}.") #{ \set harmonicDots = ##t \temporary \override TabNoteHead.stencil = #(tab-note-head::print-custom-fret-label (ratio->fret ratio)) - \temporary \override NoteHead.Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height - (lambda (grob start end) - (ly:grob::stencil-height grob))) + \temporary \override NoteHead.Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height) \temporary \override NoteHead.stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) (ly:note-head::print grob)) #(make-harmonic -- 2.39.2