CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/10/21 13:54:32
Modified files: . : ChangeLog GNUmakefile.in VERSION Documentation/topdocs: NEWS.tely Documentation/user: advanced-notation.itely basic-notation.itely changing-defaults.itely instrument-notation.itely introduction.itely input/regression: balloon.ly lyric-hyphen-retain.ly multi-measure-rest-text.ly spacing-folded-clef2.ly stencil-hacking.ly system-extents.ly lily : cluster.cc context-property.cc grob-property.cc grob-scheme.cc python : convertrules.py scm : define-grob-interfaces.scm scripts : convert-ly.py Log message: * scripts/convert-ly.py (datadir): add prefix switching hack to .py too. * lily/grob-property.cc (del_property): new function. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4202&tr2=1.4203&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/GNUmakefile.in.diff?tr1=1.164&tr2=1.165&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/VERSION.diff?tr1=1.661&tr2=1.662&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/topdocs/NEWS.tely.diff?tr1=1.103&tr2=1.104&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/advanced-notation.itely.diff?tr1=1.66&tr2=1.67&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/basic-notation.itely.diff?tr1=1.48&tr2=1.49&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/changing-defaults.itely.diff?tr1=1.139&tr2=1.140&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/instrument-notation.itely.diff?tr1=1.61&tr2=1.62&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/introduction.itely.diff?tr1=1.145&tr2=1.146&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/balloon.ly.diff?tr1=1.22&tr2=1.23&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/lyric-hyphen-retain.ly.diff?tr1=1.9&tr2=1.10&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/multi-measure-rest-text.ly.diff?tr1=1.31&tr2=1.32&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/spacing-folded-clef2.ly.diff?tr1=1.33&tr2=1.34&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/stencil-hacking.ly.diff?tr1=1.4&tr2=1.5&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/system-extents.ly.diff?tr1=1.34&tr2=1.35&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/cluster.cc.diff?tr1=1.44&tr2=1.45&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/context-property.cc.diff?tr1=1.20&tr2=1.21&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/grob-property.cc.diff?tr1=1.39&tr2=1.40&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/grob-scheme.cc.diff?tr1=1.57&tr2=1.58&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/python/convertrules.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-grob-interfaces.scm.diff?tr1=1.26&tr2=1.27&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/convert-ly.py.diff?tr1=1.250&tr2=1.251&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.4202 lilypond/ChangeLog:1.4203 --- lilypond/ChangeLog:1.4202 Fri Oct 21 13:29:40 2005 +++ lilypond/ChangeLog Fri Oct 21 13:54:30 2005 @@ -1,5 +1,8 @@ 2005-10-21 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * scripts/convert-ly.py (datadir): add prefix switching hack to + .py too. + * input/mutopia/W.A.Mozart/mozart-hrn3-defs.ily (cresc): remove space-function tweak. Index: lilypond/Documentation/topdocs/NEWS.tely diff -u lilypond/Documentation/topdocs/NEWS.tely:1.103 lilypond/Documentation/topdocs/NEWS.tely:1.104 --- lilypond/Documentation/topdocs/NEWS.tely:1.103 Tue Oct 18 23:40:15 2005 +++ lilypond/Documentation/topdocs/NEWS.tely Fri Oct 21 13:54:31 2005 @@ -45,6 +45,25 @@ @itemize @bullet + [EMAIL PROTECTED] +Each grob property can be a procedure. If this is the case, it is +assumed to be a routine that calculates said property. This is a +major internal cleanup, which also provides advanced tweakability for +power users. For example, + [EMAIL PROTECTED] +\override Beam #'direction + = #(lambda (grob) + (if (> 4 (ly:grob-array-length (ly:grob-object grob 'stems))) + DOWN + UP)) [EMAIL PROTECTED] verbatim + [EMAIL PROTECTED] +With this code fragment, the direction of a beam is decided to be up +or down, depending on the number of stems in the beam. + @item Support for figured bass has been rewritten. Now it supports continuation lines, slashed figures, and its figures, brackets, and alignments may @@ -60,23 +79,6 @@ @end lilypond This rewrite was sponsored by Trent Johnston and John Mandereau. - [EMAIL PROTECTED] -For each grob, a subproperty in @code{callbacks} property defines the -procedure which computes it. This is a major internal cleanup, which -also provides advanced tweakability for power users. For example, - [EMAIL PROTECTED] -\override Beam #'callbacks #'direction - = #(lambda (grob) - (if (> 4 (ly:grob-array-length (ly:grob-object grob 'stems))) - DOWN - UP)) [EMAIL PROTECTED] verbatim - [EMAIL PROTECTED] -With this code fragment, the direction of a beam is decided to be up -or down, depending on the number of stems in the beam. @item Subproperties, like the @code{details} field of @code{Slur} and Index: lilypond/Documentation/user/advanced-notation.itely diff -u lilypond/Documentation/user/advanced-notation.itely:1.66 lilypond/Documentation/user/advanced-notation.itely:1.67 --- lilypond/Documentation/user/advanced-notation.itely:1.66 Mon Oct 17 15:34:54 2005 +++ lilypond/Documentation/user/advanced-notation.itely Fri Oct 21 13:54:31 2005 @@ -1524,7 +1524,7 @@ } { - \override Staff.TimeSignature #'callbacks #'stencil = #Text_interface::print + \override Staff.TimeSignature #'stencil = #Text_interface::print \override Staff.TimeSignature #'text = #tsMarkup \time 3/2 c'2 \bar ":" c'4 c'4. Index: lilypond/Documentation/user/basic-notation.itely diff -u lilypond/Documentation/user/basic-notation.itely:1.48 lilypond/Documentation/user/basic-notation.itely:1.49 --- lilypond/Documentation/user/basic-notation.itely:1.48 Mon Oct 17 00:38:03 2005 +++ lilypond/Documentation/user/basic-notation.itely Fri Oct 21 13:54:31 2005 @@ -2987,7 +2987,7 @@ measure rest with a different print function, @lilypond[fragment,verbatim] -\override MultiMeasureRest #'callbacks #'stencil +\override MultiMeasureRest #'stencil = #Multi_measure_rest::percent R1 @end lilypond Index: lilypond/Documentation/user/changing-defaults.itely diff -u lilypond/Documentation/user/changing-defaults.itely:1.139 lilypond/Documentation/user/changing-defaults.itely:1.140 --- lilypond/Documentation/user/changing-defaults.itely:1.139 Mon Oct 17 15:34:54 2005 +++ lilypond/Documentation/user/changing-defaults.itely Fri Oct 21 13:54:31 2005 @@ -1324,7 +1324,7 @@ (ly:grob-set-property! grob 'extra-offset '(-2 . 5))))) \relative c'' { - \override Tie #'callbacks #'after-line-breaking = + \override Tie #'after-line-breaking = #my-callback c1 ~ \break c2 ~ c } Index: lilypond/Documentation/user/instrument-notation.itely diff -u lilypond/Documentation/user/instrument-notation.itely:1.61 lilypond/Documentation/user/instrument-notation.itely:1.62 --- lilypond/Documentation/user/instrument-notation.itely:1.61 Mon Oct 17 00:50:45 2005 +++ lilypond/Documentation/user/instrument-notation.itely Fri Oct 21 13:54:31 2005 @@ -881,7 +881,7 @@ An -- ti -- cons -- ti -- tu -- tion -- nel -- le -- \override LyricHyphen #'minimum-length = #0.7 - \override LyricHyphen #'callbacks #'springs-and-rods = + \override LyricHyphen #'springs-and-rods = #Hyphen_spanner::set_spacing_rods men -- taire -- ment. ouf~! } Index: lilypond/Documentation/user/introduction.itely diff -u lilypond/Documentation/user/introduction.itely:1.145 lilypond/Documentation/user/introduction.itely:1.146 --- lilypond/Documentation/user/introduction.itely:1.145 Mon Oct 17 00:30:31 2005 +++ lilypond/Documentation/user/introduction.itely Fri Oct 21 13:54:31 2005 @@ -336,7 +336,7 @@ \set autoBeaming = ##f \time 2/4 <d f g>4 - \once \override NoteHead #'callbacks #'stencil = #Note_head::brew_ez_stencil + \once \override NoteHead #'stencil = #Note_head::brew_ez_stencil <d f g> \once \override NoteHead #'style = #'cross <d f g> Index: lilypond/GNUmakefile.in diff -u lilypond/GNUmakefile.in:1.164 lilypond/GNUmakefile.in:1.165 --- lilypond/GNUmakefile.in:1.164 Fri Oct 21 13:29:41 2005 +++ lilypond/GNUmakefile.in Fri Oct 21 13:54:30 2005 @@ -116,12 +116,12 @@ mkdir -p $(tree-prefix)/fonts/enc mkdir -p $(tree-prefix)/tex cd $(top-build-dir)/$(outbase)/lib && \ - ln -s ../../../python/$(outconfbase) python + ln -s ../../../../python/$(outconfbase) python cd $(tree-prefix) && \ ln -s $(top-src-dir)/ly ly && \ ln -s ../../../../mf mf && \ ln -s $(top-src-dir)/ps && \ - ln -s ../../../python/$(outconfbase) python && \ + ln -s ../../../../python/$(outconfbase) python && \ ln -s $(top-src-dir)/scm && \ ln -s $(top-src-dir)/scripts scripts cd $(tree-prefix)/dvips && \ Index: lilypond/VERSION diff -u lilypond/VERSION:1.661 lilypond/VERSION:1.662 --- lilypond/VERSION:1.661 Sun Oct 9 15:28:34 2005 +++ lilypond/VERSION Fri Oct 21 13:54:30 2005 @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=7 -PATCH_LEVEL=13 +PATCH_LEVEL=14 MY_PATCH_LEVEL= Index: lilypond/input/regression/balloon.ly diff -u lilypond/input/regression/balloon.ly:1.22 lilypond/input/regression/balloon.ly:1.23 --- lilypond/input/regression/balloon.ly:1.22 Mon Oct 17 00:04:43 2005 +++ lilypond/input/regression/balloon.ly Fri Oct 21 13:54:31 2005 @@ -12,8 +12,8 @@ \relative c' { %% by hand: - \once\override Stem #'callbacks #'stencil = #Balloon_interface::print - \once\override Stem #'balloon-original-callback = #Stem::print + \once\override Stem #'stencil = #Balloon_interface::print + \once\override Stem #'original-stencil = #Stem::print \once\override Stem #'balloon-text = #"I'm a stem" \once\override Stem #'balloon-text-offset = #'(3 . 4) \once\override Stem #'balloon-text-props Index: lilypond/input/regression/lyric-hyphen-retain.ly diff -u lilypond/input/regression/lyric-hyphen-retain.ly:1.9 lilypond/input/regression/lyric-hyphen-retain.ly:1.10 --- lilypond/input/regression/lyric-hyphen-retain.ly:1.9 Mon Oct 17 00:04:44 2005 +++ lilypond/input/regression/lyric-hyphen-retain.ly Fri Oct 21 13:54:31 2005 @@ -1,5 +1,5 @@ -\version "2.7.13" +\version "2.7.14" \header { @@ -38,7 +38,7 @@ bla -- bla -- bla -- bla -- \override LyricHyphen #'minimum-length = #0.7 - \override LyricHyphen #'callbacks #'springs-and-rods = + \override LyricHyphen #'springs-and-rods = #Hyphen_spanner::set_spacing_rods bla -- bla -- bla -- bla Index: lilypond/input/regression/multi-measure-rest-text.ly diff -u lilypond/input/regression/multi-measure-rest-text.ly:1.31 lilypond/input/regression/multi-measure-rest-text.ly:1.32 --- lilypond/input/regression/multi-measure-rest-text.ly:1.31 Mon Oct 17 00:04:44 2005 +++ lilypond/input/regression/multi-measure-rest-text.ly Fri Oct 21 13:54:31 2005 @@ -1,4 +1,4 @@ -\version "2.7.13" +\version "2.7.14" \header { @@ -22,7 +22,7 @@ R2.^"4" R2.*3_\markup { \roman "a1b2c3" } R2.*10^"inner"^"top"_"inner"_"bot" - \override MultiMeasureRestText #'callbacks #'springs-and-rods + \override MultiMeasureRestText #'springs-and-rods = #Multi_measure_rest::set_text_rods R2.^"very very very very very very long text" Index: lilypond/input/regression/spacing-folded-clef2.ly diff -u lilypond/input/regression/spacing-folded-clef2.ly:1.33 lilypond/input/regression/spacing-folded-clef2.ly:1.34 --- lilypond/input/regression/spacing-folded-clef2.ly:1.33 Mon Oct 17 00:04:44 2005 +++ lilypond/input/regression/spacing-folded-clef2.ly Fri Oct 21 13:54:31 2005 @@ -1,4 +1,4 @@ -\version "2.7.13" +\version "2.7.14" \header { texidoc = "A clef can be folded below notes in a different staff, if @@ -11,8 +11,8 @@ \context { \Score - \override NonMusicalPaperColumn #'callbacks #'stencil = #Paper_column::print - \override PaperColumn #'callbacks #'stencil = #Paper_column::print + \override NonMusicalPaperColumn #'stencil = #Paper_column::print + \override PaperColumn #'stencil = #Paper_column::print \override NonMusicalPaperColumn #'font-family = #'roman \override PaperColumn #'font-family = #'roman Index: lilypond/input/regression/stencil-hacking.ly diff -u lilypond/input/regression/stencil-hacking.ly:1.4 lilypond/input/regression/stencil-hacking.ly:1.5 --- lilypond/input/regression/stencil-hacking.ly:1.4 Mon Oct 17 00:04:44 2005 +++ lilypond/input/regression/stencil-hacking.ly Fri Oct 21 13:54:31 2005 @@ -1,5 +1,5 @@ -\version "2.7.13" +\version "2.7.14" \header { texidoc=" You can write stencil callbacks in Scheme, thus providing custom glyphs for notation elements. A simple example is @@ -37,7 +37,7 @@ (subject-dim-x (ly:stencil-extent subject 0)) (subject-dim-y (ly:stencil-extent subject 1))) - ; add parens + ;; add parens (set! subject (ly:stencil-combine-at-edge (ly:stencil-combine-at-edge subject 0 1 pclose 0.2) @@ -53,13 +53,13 @@ \relative c' { c4 e - \override NoteHead #'callbacks #'stencil + \override NoteHead #'stencil = #(parenthesize-callback Note_head::print) g bes - \revert NoteHead #'callbacks % stencil + \revert NoteHead % stencil - \override Beam #'callbacks #'stencil + \override Beam #'stencil = #(parenthesize-callback Beam::print) Index: lilypond/input/regression/system-extents.ly diff -u lilypond/input/regression/system-extents.ly:1.34 lilypond/input/regression/system-extents.ly:1.35 --- lilypond/input/regression/system-extents.ly:1.34 Mon Oct 17 00:04:44 2005 +++ lilypond/input/regression/system-extents.ly Fri Oct 21 13:54:31 2005 @@ -1,4 +1,4 @@ -\version "2.7.13" +\version "2.7.14" \header { texidoc = "The size of every system is correctly determined; this @@ -10,7 +10,7 @@ \layout { \context { \Score - \override System #'callbacks #'stencil = #box-grob-stencil + \override System #'stencil = #box-grob-stencil } } Index: lilypond/lily/cluster.cc diff -u lilypond/lily/cluster.cc:1.44 lilypond/lily/cluster.cc:1.45 --- lilypond/lily/cluster.cc:1.44 Mon Sep 12 12:46:48 2005 +++ lilypond/lily/cluster.cc Fri Oct 21 13:54:31 2005 @@ -210,13 +210,13 @@ struct Cluster_beacon { public: - DECLARE_SCHEME_CALLBACK (height, (SCM, SCM)); + DECLARE_SCHEME_CALLBACK (height, (SCM)); static bool has_interface (Grob *); }; -MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 2); +MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1); SCM -Cluster_beacon::height (SCM g, SCM) +Cluster_beacon::height (SCM g) { Grob *me = unsmob_grob (g); Interval v = robust_scm2interval (me->get_property ("positions"), @@ -228,4 +228,6 @@ "cluster-beacon-interface", "A place holder for the cluster spanner to determine the vertical " "extents of a cluster spanner at this X position.", - "positions"); + + /* properties */ + "positions "); Index: lilypond/lily/context-property.cc diff -u lilypond/lily/context-property.cc:1.20 lilypond/lily/context-property.cc:1.21 --- lilypond/lily/context-property.cc:1.20 Mon Oct 17 00:30:31 2005 +++ lilypond/lily/context-property.cc Fri Oct 21 13:54:32 2005 @@ -136,7 +136,9 @@ bool ok = true; if (!scm_is_pair (scm_cdr (grob_property_path))) { - ok = type_check_assignment (symbol, new_value, ly_symbol2scm ("backend-type?")); + ok = !ly_is_procedure (new_value) + && type_check_assignment (symbol, new_value, + ly_symbol2scm ("backend-type?")); /* tack onto alist. We can use set_car, since Index: lilypond/lily/grob-property.cc diff -u lilypond/lily/grob-property.cc:1.39 lilypond/lily/grob-property.cc:1.40 --- lilypond/lily/grob-property.cc:1.39 Fri Oct 21 13:29:41 2005 +++ lilypond/lily/grob-property.cc Fri Oct 21 13:54:32 2005 @@ -88,7 +88,8 @@ if (do_internal_type_checking_global) { - if (!type_check_assignment (sym, v, ly_symbol2scm ("backend-type?"))) + if (!ly_is_procedure (v) + && !type_check_assignment (sym, v, ly_symbol2scm ("backend-type?"))) abort (); check_interfaces_for_property (this, sym); } @@ -119,7 +120,9 @@ if (do_internal_type_checking_global && scm_is_pair (handle)) { - if (!type_check_assignment (sym, scm_cdr (handle), + SCM val = scm_cdr (handle); + if (!ly_is_procedure (val) + && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) abort (); Index: lilypond/lily/grob-scheme.cc diff -u lilypond/lily/grob-scheme.cc:1.57 lilypond/lily/grob-scheme.cc:1.58 --- lilypond/lily/grob-scheme.cc:1.57 Fri Oct 21 13:29:41 2005 +++ lilypond/lily/grob-scheme.cc Fri Oct 21 13:54:32 2005 @@ -38,7 +38,8 @@ SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob"); SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); - if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) + if (!ly_is_procedure (val) + && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) error ("typecheck failed"); sc->internal_set_property (sym, val); @@ -48,7 +49,7 @@ LY_DEFINE (ly_grob_property, "ly:grob-property", 2, 0, 0, (SCM grob, SCM sym), "Return the value of a value in grob @var{g} of property @var{sym}. " - "It will return @code{' ()} (end-of-list) " + "It will return @code{'()} (end-of-list) " "if @var{sym} is undefined in @var{g}." "\n\n") { Index: lilypond/python/convertrules.py diff -u lilypond/python/convertrules.py:1.22 lilypond/python/convertrules.py:1.23 --- lilypond/python/convertrules.py:1.22 Mon Oct 17 15:34:55 2005 +++ lilypond/python/convertrules.py Fri Oct 21 13:54:32 2005 @@ -2615,3 +2615,13 @@ conversions.append (((2, 7, 13), conv, '''layout engine refactoring. [FIXME] ''')) + + + +def conv (str): + str = re.sub (r"#'callbacks", '', str) + str = re.sub (r"([XY]-extent)-callback", r'\1', str) + return str + +conversions.append (((2, 7, 14), conv, + '''Remove callbacks property, deprecate XY-extent-callback. ''')) Index: lilypond/scm/define-grob-interfaces.scm diff -u lilypond/scm/define-grob-interfaces.scm:1.26 lilypond/scm/define-grob-interfaces.scm:1.27 --- lilypond/scm/define-grob-interfaces.scm:1.26 Mon Oct 10 13:08:13 2005 +++ lilypond/scm/define-grob-interfaces.scm Fri Oct 21 13:54:32 2005 @@ -48,7 +48,7 @@ (ly:add-interface 'ligature-bracket-interface "A bracket indicating a ligature in the original edition" - '(width thickness height ligature-primitive-callback)) + '(width thickness height)) (ly:add-interface Index: lilypond/scripts/convert-ly.py diff -u lilypond/scripts/convert-ly.py:1.250 lilypond/scripts/convert-ly.py:1.251 --- lilypond/scripts/convert-ly.py:1.250 Thu Aug 18 14:04:00 2005 +++ lilypond/scripts/convert-ly.py Fri Oct 21 13:54:32 2005 @@ -22,7 +22,10 @@ if os.environ.has_key ('LILYPONDPREFIX'): datadir = os.environ['LILYPONDPREFIX'] while datadir[-1] == os.sep: - datadir= datadir[:-1] + datadir = datadir[:-1] + +if os.path.exists (os.path.join (datadir, 'share/lilypond/@TOPLEVEL_VERSION@/')): + datadir = os.path.join (datadir, 'share/lilypond/@TOPLEVEL_VERSION@/') sys.path.insert (0, os.path.join (datadir, 'python')) _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs