]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/chord-ignatzek-names.scm
Add '-dcrop' option to ps and svg backends
[lilypond.git] / scm / chord-ignatzek-names.scm
index b20d32947dd75096f363447608d33ce640916851..483b8cac8f18fc6bb20598ae7ef7ccfb120c48ff 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2000--2011  Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 2000--2015  Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
@@ -161,10 +161,12 @@ work than classifying the pitches."
       (let* ((num-markup (make-simple-markup
                           (number->string (pitch-step pitch))))
              (args (list num-markup))
-             (total (if (= (ly:pitch-alteration pitch) 0)
-                        (if (= (pitch-step pitch) 7)
-                            (list (ly:context-property context 'majorSevenSymbol))
-                            args)
+             (major-seven-symbol (ly:context-property context 'majorSevenSymbol))
+             (total
+                    (if (and (= (ly:pitch-alteration pitch) 0)
+                             (= (pitch-step pitch) 7)
+                             (markup? major-seven-symbol))
+                        (list major-seven-symbol)
                         (cons (accidental->markup (step-alteration pitch)) args))))
 
         (make-line-markup total)))
@@ -221,8 +223,8 @@ work than classifying the pitches."
          (pitches (map (lambda (x) (ly:pitch-diff x root)) (cdr in-pitches)))
          (lowercase-root?
           (and (ly:context-property context 'chordNameLowercaseMinor)
-       (let ((third (get-step 3 pitches)))
-            (and third (= (ly:pitch-alteration third) FLAT)))))
+               (let ((third (get-step 3 pitches)))
+                 (and third (= (ly:pitch-alteration third) FLAT)))))
          (exceptions (ly:context-property context 'chordNameExceptions))
          (exception (assoc-get pitches exceptions))
          (prefixes '())
@@ -242,7 +244,7 @@ work than classifying the pitches."
           ;; no exception.
           ;; handle sus4 and sus2 suffix: if there is a 3 together with
           ;; sus2 or sus4, then we explicitly say add3.
-          (map
+          (for-each
            (lambda (j)
              (if (get-step j pitches)
                  (begin
@@ -284,8 +286,7 @@ work than classifying the pitches."
                  (= 7 (pitch-step main-name))
                  (is-natural-alteration? main-name)
                  (pair? (remove-uptil-step 7 alterations))
-                 (reduce (lambda (x y) (and x y)) #t
-                         (map is-natural-alteration? alterations)))
+                 (every is-natural-alteration? alterations))
                 (begin
                   (set! main-name (last alterations))
                   (set! alterations '())))