From: David Kastrup Date: Tue, 21 Jul 2015 15:31:48 +0000 (+0200) Subject: Add/import music functions Syntax::property-{override,set)-function X-Git-Tag: release/2.19.25-1~45 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=099c754c4fed2f2df70d49b88a028fb39272d165;p=lilypond.git Add/import music functions Syntax::property-{override,set)-function --- diff --git a/lily/include/lily-imports.hh b/lily/include/lily-imports.hh index c53ad421d8..638aa132a9 100644 --- a/lily/include/lily-imports.hh +++ b/lily/include/lily-imports.hh @@ -122,8 +122,10 @@ namespace Syntax { extern Variable partial_markup; extern Variable partial_music_function; extern Variable property_override; + extern Variable property_override_function; extern Variable property_revert; extern Variable property_set; + extern Variable property_set_function; extern Variable property_unset; extern Variable repeat; extern Variable repetition_chord; diff --git a/lily/lily-imports.cc b/lily/lily-imports.cc index 16087513df..27ca05924e 100644 --- a/lily/lily-imports.cc +++ b/lily/lily-imports.cc @@ -115,8 +115,10 @@ namespace Syntax { Variable partial_markup ("partial-markup"); Variable partial_music_function ("partial-music-function"); Variable property_override ("property-override"); + Variable property_override_function ("property-override-function"); Variable property_revert ("property-revert"); Variable property_set ("property-set"); + Variable property_set_function ("property-set-function"); Variable property_unset ("property-unset"); Variable repeat ("repeat"); Variable repetition_chord ("repetition-chord"); diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index 0d37c0f766..c690413c88 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -246,6 +246,16 @@ into a @code{MultiMeasureTextEvent}." 'grob-property-path (cdr path))) context))) +(define-public property-override-function + (ly:make-music-function + (list (cons ly:music? (void-music)) symbol? symbol-list? scheme?) + property-override)) + +(define-public property-set-function + (ly:make-music-function + (list (cons ly:music? (void-music)) symbol? symbol? scheme?) + property-set)) + (define (get-first-context-id! mus) "Find the name of a ContextSpeccedMusic, possibly naming it" (let ((id (ly:music-property mus 'context-id)))