]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/music-functions.scm
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / scm / music-functions.scm
index 78efe3e7460a6ba0eb33e49be80c638db3e00a66..1f8b593318f1bb409d468c906d2fdfd938d8c53e 100644 (file)
@@ -782,6 +782,7 @@ Syntax:
 
   (if (vector? (ly:music-property quote-music 'quoted-events))
       (let* ((dir (ly:music-property quote-music 'quoted-voice-direction))
+            (clef (ly:music-property quote-music 'quoted-music-clef))
             (main-voice (if (eq? 1 dir) 1 0))
             (cue-voice (if (eq? 1 dir) 0 1))
             (main-music (ly:music-property quote-music 'element))
@@ -793,14 +794,19 @@ Syntax:
            ;; to have opposite stems.
            (begin
              (set! return-value
-
                    ;; cannot context-spec Quote-music, since context
                    ;; for the quotes is determined in the iterator.
                    (make-sequential-music
                     (list
+                     (if (null? clef)
+                         (make-music 'Music)
+                         (make-cue-clef-set clef))
                      (context-spec-music (make-voice-props-set cue-voice) 'CueVoice "cue")
                      quote-music
-                     (context-spec-music (make-voice-props-revert)  'CueVoice "cue"))))
+                     (context-spec-music (make-voice-props-revert) 'CueVoice "cue")
+                     (if (null? clef)
+                         (make-music 'Music)
+                         (make-cue-clef-unset)))))
              (set! main-music
                    (make-sequential-music
                     (list
@@ -864,28 +870,17 @@ Syntax:
   (ly:moment-main-numerator moment)
   (ly:moment-main-denominator moment)))
 
-(define (skip-this moment)
- "set skipTypesetting, make SkipMusic of the given MOMENT length,
- and then unset skipTypesetting."
- (make-sequential-music
-  (list
-   (context-spec-music (make-property-set 'skipTypesetting #t)
-    'Score)
-   (make-music 'SkipMusic 'duration
-    (make-duration-of-length moment))
-   (context-spec-music (make-property-set 'skipTypesetting #f)
-    'Score))))
-
-(define (unskip-this moment)
- "unset skipTypesetting, make SkipMusic of the given MOMENT length,
- and then set skipTypesetting."
+(define (make-skipped moment bool)
+ "Depending on BOOL, set or unset skipTypesetting,
+then make SkipMusic of the given MOMENT length, and
+then revert skipTypesetting."
  (make-sequential-music
   (list
-   (context-spec-music (make-property-set 'skipTypesetting #f)
+   (context-spec-music (make-property-set 'skipTypesetting bool)
     'Score)
    (make-music 'SkipMusic 'duration
     (make-duration-of-length moment))
-   (context-spec-music (make-property-set 'skipTypesetting #t)
+   (context-spec-music (make-property-set 'skipTypesetting (not bool))
     'Score))))
 
 (define (skip-as-needed music parser)
@@ -924,11 +919,11 @@ Syntax:
          (list
           (make-sequential-music
            (list
-            (skip-this skip-length)
+            (make-skipped skip-length #t)
             ;; let's draw a separator between the beginning and the end
             (context-spec-music (make-property-set 'whichBar "||")
                                 'Timing)))
-          (unskip-this show-first-length)
+          (make-skipped show-first-length #f)
           music))))
 
      ;; we may only want to print the last length
@@ -937,7 +932,7 @@ Syntax:
           ((skip-length (ly:moment-sub orig-length show-last-length)))
         (make-simultaneous-music
          (list
-          (skip-this skip-length)
+          (make-skipped skip-length #t)
           music))))
 
      ;; we may only want to print the beginning; in this case