From: David Kastrup Date: Sat, 24 Nov 2012 09:27:55 +0000 (+0100) Subject: Issue 2974: music-functions-init.ly: Avoid unnecessary use of $ instead of # X-Git-Tag: release/2.17.8-1~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=37a459777abb5b715df628fca81b26ebcdc0dd3d;p=lilypond.git Issue 2974: music-functions-init.ly: Avoid unnecessary use of $ instead of # $ creates unnecessary copies, unnecessary reinterpretation, and reassigns the music origin of some expressions to the current parser location, which in #{ ... #} turns out to be music-functions-init.ly itself, hardly helpful. --- diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index df5d8a5005..3b25cca544 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -262,11 +262,11 @@ as @code{\\compoundMeter #'((3 2 8))} or shorter #{ \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob (format-compound-time args))) - \set Timing.timeSignatureFraction = $timesig - \set Timing.baseMoment = $beat - \set Timing.beatStructure = $beatGrouping + \set Timing.timeSignatureFraction = #timesig + \set Timing.baseMoment = #beat + \set Timing.beatStructure = #beatGrouping \set Timing.beamExceptions = #'() - \set Timing.measureLength = $mlen + \set Timing.measureLength = #mlen #} )) crossStaff = @@ -275,7 +275,7 @@ crossStaff = #{ \temporary \override Stem.cross-staff = #cross-staff-connect \temporary \override Flag.style = #'no-flag - $notes + #notes \revert Stem.cross-staff \revert Flag.style #}) @@ -436,7 +436,7 @@ harmonics played on a fretted instrument by touching the strings at @var{fret}." (ly:grob::stencil-height grob))) \temporary \override NoteHead.stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) (ly:note-head::print grob)) - $(make-harmonic + #(make-harmonic (calc-harmonic-pitch (fret->pitch (number->string fret)) music)) \unset harmonicDots \revert TabNoteHead.stencil @@ -456,7 +456,7 @@ given through @var{ratio}.") (ly:grob::stencil-height grob))) \temporary \override NoteHead.stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) (ly:note-head::print grob)) - $(make-harmonic + #(make-harmonic (calc-harmonic-pitch (ratio->pitch ratio) music)) \unset harmonicDots \revert TabNoteHead.stencil @@ -474,8 +474,8 @@ If @var{item} is a symbol list of form @code{GrobName} or specified by it. If @var{item} is a music expression, the result is the same music expression with an appropriate tweak applied to it.") (if (ly:music? item) - #{ \tweak transparent ##t $item #} - #{ \override $item #'transparent = ##t #})) + #{ \tweak transparent ##t #item #} + #{ \override #item . transparent = ##t #})) inStaffSegno = #(define-music-function (parser location) () @@ -682,8 +682,8 @@ If @var{item} is a symbol list of form @code{GrobName} or specified by it. If @var{item} is a music expression, the result is the same music expression with an appropriate tweak applied to it.") (if (ly:music? item) - #{ \tweak stencil ##f $item #} - #{ \override $item #'stencil = ##f #})) + #{ \tweak stencil ##f #item #} + #{ \override #item . stencil = ##f #})) once = #(define-music-function (parser location music) (ly:music?)