From 673d79f588003877a86a8c31a27ab8c6d8787398 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 27 Sep 2003 15:12:05 +0000 Subject: [PATCH] * scripts/lilypond.py (escape_path): revise. * scm/music-functions.scm (set-output-property): new function. --- ChangeLog | 10 +++++++++- input/test/extra-staff.ly | 8 +++++--- scm/music-functions.scm | 16 ++++++++++++++++ scripts/lilypond.py | 4 ++-- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5364b50823..846b1d6d65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-09-27 Han-Wen Nienhuys + + * scripts/lilypond.py (escape_path): revise. + + * scm/music-functions.scm (set-output-property): new function. + 2003-09-27 Jan Nieuwenhuizen * cygwin/mknetrel: Next try in building doc on Cygwin natively; @@ -15,6 +21,8 @@ 2003-09-27 Han-Wen Nienhuys + * scripts/lilypond.py (escape_path): escape quotes too. + * Documentation/user/lilypond.tely (Unified index): rename Index to accomodate Windows breakage. @@ -57,7 +65,7 @@ 2003-09-25 Han-Wen Nienhuys - * lily/tie-performer.cc (initialize): init prev_event + * lily/tie-performer.cc (initialize): init prev_event * make/lilypond.redhat.spec.in: move site-start back to /usr/share. diff --git a/input/test/extra-staff.ly b/input/test/extra-staff.ly index 2a304ef38a..d3e1017bbf 100644 --- a/input/test/extra-staff.ly +++ b/input/test/extra-staff.ly @@ -1,6 +1,7 @@ -#(ly:set-option 'old-relative) + \version "1.9.8" -% definately wil be renamed to something. + +% definitely wil be renamed to something. %{ (Message vers:9) To: Adrian Mariano . @@ -25,6 +26,7 @@ Try this (we'll include it in pl23/24): extra-staff.ly: %} + \header{ texidoc="@cindex Staff Extra @cindex Staff Ossia You can add an extra staff after the beginning of a piece. "} @@ -35,7 +37,7 @@ You can add an extra staff after the beginning of a piece. "} \new StaffGroup \notes\relative c''{ \new Staff c1 c - << \new Staff { c1 } \new Staff { c1 } >> + << c1 \new Staff { c1 } >> c } >> diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 4ee3dfe0b5..5af90d2260 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -541,6 +541,22 @@ Rest can contain a list of beat groupings (if (func grob) (ly:set-grob-property! grob sym val))) + +(define-public ((set-output-property grob-name symbol val) grob grob-c context) + "Usage: + +\\applyoutput #(set-output-property 'Clef 'extra-offset '(0 . 1)) + +" + + (let* + ((meta (ly:get-grob-property grob 'meta))) + + (if (equal? (cdr (assoc 'name meta)) grob-name) + (ly:set-grob-property! grob symbol val) + ))) + + ;; (define-public (smart-bar-check n) "Make a bar check that checks for a specific bar number. diff --git a/scripts/lilypond.py b/scripts/lilypond.py index 681b8fa231..100036abcd 100644 --- a/scripts/lilypond.py +++ b/scripts/lilypond.py @@ -234,8 +234,8 @@ def set_setting (dict, key, val): def escape_shell (x): - return re.sub (r'''([^\\])([`'"\\\s])''', r'\1\\\2', x) - # help emacs'" broken python mode + return re.sub ("(\s|[`'\"\\\\])", r'\\\1',x) + def run_lilypond (files, dep_prefix): def make_include_option (x): -- 2.39.5