]> git.donarmstrong.com Git - lilypond.git/commit
Context mods stored in variable, can be inserted into \with or \context
authorReinhold Kainhofer <reinhold@eeepc.(none)>
Wed, 10 Mar 2010 14:40:00 +0000 (15:40 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 3 Apr 2010 11:29:23 +0000 (13:29 +0200)
commit3c2e17bbdd44174a8dab25333738a75afa788f31
tree2fa9d749d9dace037c7e2e0d0958ca7e315ac212
parent8f88a5f91c5a8468d52921f37f4ea4a00ec29498
Context mods stored in variable, can be inserted into \with or \context

-) Context-Modifications: create C++ class to store them
-) context modifications lists are stored in a dedicated simple scheme object
     (C++ class Context_mod)
-) Changes to the parser:
  -) \with blocks no longer return a simple list, but a Context_mod object
  -) context_modifications objects (stored in variables) are now also allowed
     with \with clauses
  -) context_modifications objects are also allowed inside \context

-) this allows us to rewrite \RemoveEmptyStaffContext (unfortunately with
   a little different syntax, since we no longer store \Staff inside the
 \RESC command) so that it no longer erases previous settings to the
 Staff context. Now, instead of
        \context { \RemoveEmptyStaffContext }
 one can do
        \context { \Staff \RemoveEmptyStaves }
 with the same effect and preserve previous changes to the Staff context.
 (The same applies of course to \DrumStaff, \RhythmicStaff, etc. as well)

-) Adjusted engraver-init.ly and the regtests accordingly; Also added regtest
   that checks for RESC not discarding previous settings to the Staff context
-) Add convert-ly rule (\RemoveEmpty*StaffContext -> \*Staff \RemoveEmptyStaves)
-) Add scheme interface to extract context mods and add context mods with Scheme
-) Add changelog entry
16 files changed:
Documentation/changes.tely
input/regression/context-mod-context.ly [new file with mode: 0644]
input/regression/context-mod-with.ly [new file with mode: 0644]
input/regression/hara-kiri-drumstaff.ly
input/regression/hara-kiri-keep-previous-settings.ly [new file with mode: 0644]
input/regression/hara-kiri-percent-repeat.ly
input/regression/hara-kiri-pianostaff.ly
input/regression/hara-kiri-rhythmicstaff.ly
input/regression/hara-kiri-tabstaff.ly
lily/context-mod-scheme.cc [new file with mode: 0644]
lily/context-mod.cc [new file with mode: 0644]
lily/include/context-mod.hh [new file with mode: 0644]
lily/include/lily-proto.hh
lily/parser.yy
ly/engraver-init.ly
python/convertrules.py