]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/music-functions-init.ly
killCues should not remove music quoted with \quoteDuring, only \cueDuring!
[lilypond.git] / ly / music-functions-init.ly
index 7bec31990ee298fab46fd25cf24470d1f9618f2f..2f1f5310368fe882f64a38f894f6ba798ce18a02 100644 (file)
@@ -278,23 +278,6 @@ grace =
 
 
 
-%% see comment for page-layout-parser definition below.
-includePageLayoutFile =
-#(define-music-function (parser location) ()
-   (_i "Include the file @var{<basename>-page-layout.ly}. Deprecated as
-part of two-pass spacing.")
-   (if (not (ly:get-option 'dump-tweaks))
-       (let ((tweak-filename (format #f "~a-page-layout.ly"
-                                    (ly:parser-output-name parser))))
-        (if (access? tweak-filename R_OK)
-            (begin
-              (ly:message "Including tweak file ~a" tweak-filename)
-              (set! page-layout-parser (ly:parser-clone parser))
-              (ly:parser-parse-string page-layout-parser
-                                      (format #f "\\include \"~a\""
-                                              tweak-filename))))))
-   (make-music 'SequentialMusic 'void #t))
-
 instrumentSwitch =
 #(define-music-function
    (parser location name) (string?)
@@ -306,7 +289,7 @@ instrumentSwitch =
        )
 
      (if (not handle)
-        (ly:input-message "No such instrument: ~a" name))
+        (ly:input-message location "No such instrument: ~a" name))
      (context-spec-music
       (make-music 'SimultaneousMusic
                  'elements
@@ -339,7 +322,8 @@ killCues =
    (_i "Remove cue notes from @var{music}.")
    (music-map
     (lambda (mus)
-      (if (string? (ly:music-property mus 'quoted-music-name))
+      (if (and (string? (ly:music-property mus 'quoted-music-name))
+              (string=? (ly:music-property mus 'quoted-context-id) "cue"))
          (ly:music-property mus 'element)
          mus)) music))
 
@@ -461,10 +445,6 @@ or @code{\"GrobName\"}")
 
 
 
-%% Parser used to read page-layout file (see includePageLayoutFile
-%% above), and then retreive score tweaks (see scoreTweak below).
-#(define page-layout-parser #f)
-
 %% pageBreak and pageTurn are music functions (iso music indentifiers),
 %% because music identifiers are not allowed at top-level.
 pageBreak =
@@ -715,18 +695,6 @@ scaleDurations =
    (ly:music-compress music
                      (ly:make-moment (car fraction) (cdr fraction))))
 
-%% see comment for page-layout-parser definition above.
-scoreTweak =
-#(define-music-function (parser location name) (string?)
-   (_i "Include the score tweak, if exists.")
-   (if (and page-layout-parser (not (ly:get-option 'dump-tweaks)))
-       (let ((tweak-music (ly:parser-lookup page-layout-parser
-                                           (string->symbol name))))
-        (if (ly:music? tweak-music)
-            tweak-music
-            (make-music 'SequentialMusic)))
-       (make-music 'SequentialMusic)))
-
 setBeatGrouping =
 #(define-music-function (parser location grouping) (pair?)
    (_i "Set the beat grouping in the current time signature to