+oldaddlyrics =
+#(define-music-function (parser location music lyrics) (ly:music? ly:music?)
+
+ (make-music 'OldLyricCombineMusic
+ 'origin location
+ 'elements (list music lyrics)))
+
+
+overrideProperty =
+#(define-music-function (parser location name property value)
+ (string? symbol? scheme?)
+
+
+ (_i "Set @var{property} to @var{value} in all grobs named @var{name}.
+The @var{name} argument is a string of the form @code{\"Context.GrobName\"}
+or @code{\"GrobName\"}")
+
+ (let*
+ ((name-components (string-split name #\.))
+ (context-name 'Bottom)
+ (grob-name #f))
+
+ (if (> 2 (length name-components))
+ (set! grob-name (string->symbol (car name-components)))
+ (begin
+ (set! grob-name (string->symbol (list-ref name-components 1)))
+ (set! context-name (string->symbol (list-ref name-components 0)))))
+
+ (make-music 'ApplyOutputEvent
+ 'origin location
+ 'context-type context-name
+ 'procedure
+ (lambda (grob orig-context context)
+ (if (equal?
+ (cdr (assoc 'name (ly:grob-property grob 'meta)))
+ grob-name)
+ (set! (ly:grob-property grob property) value))))))
+
+%% These are music functions (iso music indentifiers), because music identifiers
+%% are not allowed at top-level.
+pageBreak =
+#(define-music-function (location parser) ()
+ (_i "Force a page break. May be used at toplevel (ie between scores or
+markups), or inside a score.")
+ (make-music 'EventChord
+ 'page-marker #t
+ 'line-break-permission 'force
+ 'page-break-permission 'force
+ 'elements (list (make-music 'LineBreakEvent
+ 'break-permission 'force)
+ (make-music 'PageBreakEvent
+ 'break-permission 'force))))
+
+noPageBreak =
+#(define-music-function (location parser) ()
+ (_i "Forbid a page break. May be used at toplevel (ie between scores or
+markups), or inside a score.")
+ (make-music 'EventChord
+ 'page-marker #t
+ 'page-break-permission 'forbid
+ 'elements (list (make-music 'PageBreakEvent
+ 'break-permission '()))))
+
+pageTurn =
+#(define-music-function (location parser) ()
+ (_i "Force a page turn between two scores or top-level markups.")
+ (make-music 'EventChord
+ 'page-marker #t
+ 'line-break-permission 'force
+ 'page-break-permission 'force
+ 'page-turn-permission 'force
+ 'elements (list (make-music 'LineBreakEvent
+ 'break-permission 'force)
+ (make-music 'PageBreakEvent
+ 'break-permission 'force)
+ (make-music 'PageTurnEvent
+ 'break-permission 'force))))
+
+noPageTurn =
+#(define-music-function (location parser) ()
+ (_i "Forbid a page turn. May be used at toplevel (ie between scores or
+markups), or inside a score.")
+ (make-music 'EventChord
+ 'page-marker #t
+ 'page-turn-permission 'forbid
+ 'elements (list (make-music 'PageTurnEvent
+ 'break-permission '()))))
+
+allowPageTurn =
+#(define-music-function (location parser) ()
+ (_i "Allow a page turn. May be used at toplevel (ie between scores or
+markups), or inside a score.")
+ (make-music 'EventChord
+ 'page-marker #t
+ 'page-turn-permission 'allow
+ 'elements (list (make-music 'PageTurnEvent
+ 'break-permission 'allow))))
+
+%% Todo:
+%% doing
+%% define-music-function in a .scm causes crash.
+
+octaveCheck =
+#(define-music-function (parser location pitch-note) (ly:music?)
+ (_i "octave check")
+
+ (make-music 'RelativeOctaveCheck