[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: ,


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

I've followed Kieren's example here,,
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'.


Make accidental styles available as context mods.

* lily/ (ly_make_context_mod):

  add exported function to create new context mod, either empty or with
  optional init list

* lily/, 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
  overwriting \description inside

* ly/

  define all accidental styles as context modifications via helper

* 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

Please review this at

Affected files:
  M lily/
  M lily/
  M lily/include/context-mod.hh
  M lily/parser.yy
  M ly/
  M ly/
  M scm/music-functions.scm

reply via email to

[Prev in Thread] Current Thread [Next in Thread]