[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make accidental styles available as context mods. (issue4819064)
From: |
n . puttock |
Subject: |
Make accidental styles available as context mods. (issue4819064) |
Date: |
Sun, 07 Aug 2011 15:01:33 +0000 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Make accidental styles available as context mods. (issue4819064),
n . puttock <=