From: David Kastrup Date: Sun, 6 Apr 2014 17:59:25 +0000 (+0200) Subject: Issue 3894: accidental rule 'teaching' broke X-Git-Tag: release/2.19.5-1~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=423deeb9913f9ded5aebac5223fdea1db59a0254;p=lilypond.git Issue 3894: accidental rule 'teaching' broke Revert part of "Issue 2745: more fun with accidental rules." This reverts the part of commit bbca17061fbc7a25ca4050e6d031b3e9562b658e that deals with the teaching accidental rule. --- diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 9f919b0861..b0c98769ae 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -1610,10 +1610,10 @@ look at bar lines nor different accidentals at the same note name." (and (equal? entrybn barnum) (equal? entrymp measurepos))))))))) (define-public (dodecaphonic-no-repeat-rule context pitch barnum measurepos) - "An accidental rule that typesets an accidental before every note -(just as in the dodecaphonic accidental style) @emph{except} if the note -is immediately preceded by a note with the same pitch. This is a common -accidental style in contemporary notation." + "An accidental rule that typesets an accidental before every +note (just as in the dodecaphonic accidental style) @emph{except} if +the note is immediately preceded by a note with the same pitch. This +is a common accidental style in contemporary notation." (let* ((keysig (ly:context-property context 'localKeySignature)) (entry (find-pitch-entry keysig pitch #t #t))) (if (not entry) @@ -1632,9 +1632,13 @@ on the same staff line." (entry (find-pitch-entry keysig pitch #t #t))) (if (not entry) (cons #f #f) - (let* ((entrymp (key-entry-measure-position entry)) + (let* ((global-entry (find-pitch-entry keysig pitch #f #f)) + (key-acc (key-entry-alteration global-entry)) + (acc (ly:pitch-alteration pitch)) + (entrymp (key-entry-measure-position entry)) (entrybn (key-entry-bar-number entry))) - (cons #f (not (and (equal? entrybn barnum) (equal? entrymp measurepos)))))))) + (cons #f (not (or (equal? acc key-acc) + (and (equal? entrybn barnum) (equal? entrymp measurepos))))))))) (define-public (set-accidentals-properties extra-natural auto-accs auto-cauts