From 8cfbd3bcdd11ec65a899f76fca453df541766a90 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 20 Dec 2004 14:07:03 +0000 Subject: [PATCH] (Invoking lilypond): Bugfix. --- Documentation/user/invoking.itely | 2 +- scm/chord-ignatzek-names.scm | 25 +++++++------------- scm/lily-library.scm | 39 ++++++++++++++++--------------- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/Documentation/user/invoking.itely b/Documentation/user/invoking.itely index 40334bbaed..7fcc0bcd8e 100644 --- a/Documentation/user/invoking.itely +++ b/Documentation/user/invoking.itely @@ -70,7 +70,7 @@ for @TeX{} output, to be processed with La@TeX{} @item scm for a dump of the raw, internal Scheme-based drawing commands. @cindex Scheme dump -@end itemize +@end table @cindex output format, setting diff --git a/scm/chord-ignatzek-names.scm b/scm/chord-ignatzek-names.scm index a3bbe590d9..1063f5c76a 100644 --- a/scm/chord-ignatzek-names.scm +++ b/scm/chord-ignatzek-names.scm @@ -282,15 +282,12 @@ work than classifying the pitches." ((get-step 6 pitches) (set! main-name (get-step 6 pitches))) ((get-step 5 pitches) (set! main-name (get-step 5 pitches))) ((get-step 4 pitches) (set! main-name (get-step 4 pitches))) - ((get-step 3 pitches) (set! main-name (get-step 3 pitches))) - ) - - (let* - ( - (3-diff? (lambda (x y) - (= (- (pitch-step y) (pitch-step x)) 2))) - (split (split-at-predicate 3-diff? (remove-uptil-step 5 pitches))) - ) + ((get-step 3 pitches) (set! main-name (get-step 3 pitches)))) + + (let* ((3-diff? (lambda (x y) + (= (- (pitch-step y) (pitch-step x)) 2))) + (split (split-at-predicate + 3-diff? (remove-uptil-step 5 pitches)))) (set! alterations (append alterations (car split))) (set! add-steps (append add-steps (cdr split))) (set! alterations (delq main-name alterations)) @@ -309,11 +306,7 @@ work than classifying the pitches." (map is-natural-alteration? alterations))) (begin (set! main-name (last alterations)) - (set! alterations '()) - )) - - (ignatzek-format-chord-name root prefixes main-name alterations add-steps suffixes bass-note) - ))) - )) - + (set! alterations '()))) + (ignatzek-format-chord-name + root prefixes main-name alterations add-steps suffixes bass-note)))))) diff --git a/scm/lily-library.scm b/scm/lily-library.scm index 8cc796b897..32b44fddec 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -199,30 +199,31 @@ found." (else (set-car! acc (cons (car lst) (car acc))) (set-cdr! acc (cdr lst)) - acc)) - (let* ((c (cons '() '()))) - (inner-split predicate lst c) - (set-car! c (reverse! (car c))) - c))) + acc))) + + (let* ((c (cons '() '()))) + (inner-split predicate lst c) + (set-car! c (reverse! (car c))) + c)) (define-public (split-list lst sep?) - "(display (split-list '(a b c / d e f / g) (lambda (x) (equal? x '/))) ) + "(display (split-list '(a b c / d e f / g) (lambda (x) (equal? x '/))) ) => ((a b c) (d e f) (g)) " - ;; " Emacs is broken - (define (split-one sep? lst acc) - "Split off the first parts before separator and return both parts." - (if (null? lst) - (cons acc '()) - (if (sep? (car lst)) - (cons acc (cdr lst)) - (split-one sep? (cdr lst) (cons (car lst) acc))))) - - (if (null? lst) - '() - (let* ((c (split-one sep? lst '()))) - (cons (reverse! (car c) '()) (split-list (cdr c) sep?))))) + ;; " Emacs is broken + (define (split-one sep? lst acc) + "Split off the first parts before separator and return both parts." + (if (null? lst) + (cons acc '()) + (if (sep? (car lst)) + (cons acc (cdr lst)) + (split-one sep? (cdr lst) (cons (car lst) acc))))) + + (if (null? lst) + '() + (let* ((c (split-one sep? lst '()))) + (cons (reverse! (car c) '()) (split-list (cdr c) sep?))))) (define-public (offset-add a b) (cons (+ (car a) (car b)) -- 2.39.2