]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2974: music-functions-init.ly: Avoid unnecessary use of $ instead of #
authorDavid Kastrup <dak@gnu.org>
Sat, 24 Nov 2012 09:27:55 +0000 (10:27 +0100)
committerDavid Kastrup <dak@gnu.org>
Fri, 30 Nov 2012 12:37:20 +0000 (13:37 +0100)
$ 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.

ly/music-functions-init.ly

index df5d8a500523c5504bb4e6eec9ea325daef3de91..3b25cca5440a1a3e2992e2b7e1eefa10206c7e07 100644 (file)
@@ -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?)