]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix unproper nesting of various property overrides
authorDavid Kastrup <dak@gnu.org>
Sat, 13 Oct 2012 16:01:51 +0000 (18:01 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 26 Oct 2012 04:54:49 +0000 (06:54 +0200)
Due to the unavailability of \temporary\override, \acciaccatura and
\slashedGrace had been losing any previous setting of
Flag.stroke-style.

\crossStaff had been losing the previous setting of Flag.style.

\harmonicByFret and \harmonicDots had been losing the previous setting
of TabNoteHead.stencil, NoteHead.Y-extent and NoteHead.stencil.

\temporary\override is employed in this patch for fixing those
shortcomings.

ly/grace-init.ly
ly/music-functions-init.ly

index abbfd8a3d9b7d2e1d5bf0dd59f4af92ee7973103..2e3dbce1cbd2586cdcc1105f4ba4945cd6bde951 100644 (file)
@@ -21,7 +21,7 @@ stopAppoggiaturaMusic =  {
 
 startAcciaccaturaMusic =  {
     <>\startGraceSlur
-    \override Flag  #'stroke-style = #"grace"
+    \temporary \override Flag  #'stroke-style = #"grace"
 }
 
 stopAcciaccaturaMusic =  {
@@ -30,7 +30,7 @@ stopAcciaccaturaMusic =  {
 }
 
 startSlashedGraceMusic =  {
-  \override Flag #'stroke-style = #"grace"
+  \temporary \override Flag #'stroke-style = #"grace"
 }
 
 stopSlashedGraceMusic =  {
index 4ffb06f10a61b0938bfad1138ae121bccc1e548a..71bd76ca54d6cf5f2a2f8afca8fed44e3ec34320 100644 (file)
@@ -259,8 +259,8 @@ crossStaff =
 #(define-music-function (parser location notes) (ly:music?)
   (_i "Create cross-staff stems")
   #{
-  \override Stem #'cross-staff = #cross-staff-connect
-  \override Flag #'style = #'no-flag
+  \temporary \override Stem #'cross-staff = #cross-staff-connect
+  \temporary \override Flag #'style = #'no-flag
   $notes
   \revert Stem #'cross-staff
   \revert Flag #'style
@@ -418,11 +418,11 @@ harmonicByFret = #(define-music-function (parser location fret music) (number? l
 harmonics played on a fretted instrument by touching the strings at @var{fret}.")
   #{
     \set harmonicDots = ##t
-    \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (number->string fret))
-    \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height
+    \temporary \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (number->string fret))
+    \temporary \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height
                                        (lambda (grob start end)
                                                (ly:grob::stencil-height grob)))
-    \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed)
+    \temporary \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed)
                                             (ly:note-head::print grob))
     $(make-harmonic
        (calc-harmonic-pitch (fret->pitch (number->string fret)) music))
@@ -438,11 +438,11 @@ harmonics played on a fretted instrument by touching the strings at the point
 given through @var{ratio}.")
   #{
     \set harmonicDots = ##t
-    \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (ratio->fret ratio))
-    \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height
+    \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)))
-    \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed)
+    \temporary \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed)
                                             (ly:note-head::print grob))
     $(make-harmonic
       (calc-harmonic-pitch (ratio->pitch ratio) music))