Reviewers: , Message: Hi,
This patch adds context modification identifiers for all supported accidental styles. This should make it much easier for users to set a style globally, since there's no need to work out what each style sets internally. I've followed Kieren's example here, http://lists.gnu.org/archive/html/lilypond-user/2011-07/msg00048.html, for naming, though I'd be happy to change it if anybody can think of more suitable names. There is one minor annoyance with the documentation: since most styles use the curried function `make-accidental-rule', this doesn't give any useful information in the notation appendix (it appears each time as an anonymous lambda). I'd appreciate any thoughts on how we can improve this without having to define each use of `make-accidental-rule'. Cheers, Neil Description: Make accidental styles available as context mods. * lily/context-mod-scheme.cc (ly_make_context_mod): add exported function to create new context mod, either empty or with optional init list * lily/context-mod.cc, lily/include/context-mod.hh: add ctor which takes modification list * lily/parser.yy (context_def_spec_body): ignore `description' tag when adding context modification to prevent its overwriting \description inside engraver-init.ly * ly/context-mods-init.ly: define all accidental styles as context modifications via helper function * ly/engraver-init.ly (Score, MensuralStaff): use context mod definitions for accidental style settings * scm/music-functions.scm (set-accidental-style): move styles to alist (all-accidental-styles), adding documentation strings Please review this at http://codereview.appspot.com/4819064/ Affected files: M lily/context-mod-scheme.cc M lily/context-mod.cc M lily/include/context-mod.hh M lily/parser.yy M ly/context-mods-init.ly M ly/engraver-init.ly M scm/music-functions.scm _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel