diff options
author | David Kastrup <dak@gnu.org> | 2016-06-02 14:17:18 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-06-09 09:33:10 +0200 |
commit | 40c2941f2217f19a8b6c30ff75a030283b824b42 (patch) | |
tree | 9ea30fe64ef7725396479fc27b0503ff7dfe0127 /scm | |
parent | 635394275d8eff363b09b232bb84ec04d3bcf64b (diff) |
Issue 4874/2: Turn pitch-related settings into session variables
This concerns pitchnames, default-language, previous-pitchnames,
drumPitchNames, and chordmodifiers.
Diffstat (limited to 'scm')
-rw-r--r-- | scm/chord-entry.scm | 2 | ||||
-rw-r--r-- | scm/define-music-display-methods.scm | 3 | ||||
-rw-r--r-- | scm/define-note-names.scm | 13 |
3 files changed, 12 insertions, 6 deletions
diff --git a/scm/chord-entry.scm b/scm/chord-entry.scm index 1d41c973e8..23601a8dea 100644 --- a/scm/chord-entry.scm +++ b/scm/chord-entry.scm @@ -18,6 +18,8 @@ ;; for define-safe-public when byte-compiling using Guile V2 (use-modules (scm safe-utility-defs) (ice-9 receive)) +(define-session-public chordmodifiers '()) + (define-public (construct-chord-elements root duration modifications) "Build a chord on root using modifiers in @var{modifications}. @code{NoteEvents} have duration @var{duration}. diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index 10aecbd1db..a3b620469d 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -89,8 +89,7 @@ expression." (define (pitch= pitch1 pitch2) (and (= (ly:pitch-notename pitch1) (ly:pitch-notename pitch2)) (= (ly:pitch-alteration pitch1) (ly:pitch-alteration pitch2)))) - (let* ((pitches (ly:parser-lookup 'pitchnames)) - (result (rassoc ly-pitch pitches pitch=))) + (let* ((result (rassoc ly-pitch pitchnames pitch=))) (and result (car result)))) (define-public (octave->lily-string pitch) diff --git a/scm/define-note-names.scm b/scm/define-note-names.scm index 5825967428..e7d208a511 100644 --- a/scm/define-note-names.scm +++ b/scm/define-note-names.scm @@ -33,11 +33,16 @@ ;;; Variable declaration -(define-public pitchnames '()) -(define-public default-language "") -(define-public previous-pitchnames #f) +(define-session-public pitchnames '()) +(define-session-public default-language "") +(define-session-public previous-pitchnames #f) -(define-public language-pitch-names +;;; A bit out of place, but we don't have a good place elsewhere in +;;; scm since it is only filled in ly/drumpitch-init.ly and we need it +;;; in (scm lily) in order to access it in ly/parser.yy. +(define-session-public drumPitchNames '()) + +(define-session-public language-pitch-names `( ;; Language: Nederlands --------------------------------------------; ;; Dutch note names -- LilyPond's default language. |