From d03ae375a34eaac79b224c4d01bd24749c4c6787 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 27 Nov 2012 15:55:43 +0100 Subject: [PATCH] Issue 2984: Use define-void-function rather than define-music-function in several places --- ...so-book-parts-in-scheme-without-using-the-parser.ly | 5 ++--- input/regression/figured-bass-slashed-numbers.ly | 3 +-- input/regression/identifier-following-chordmode.ly | 5 ++--- input/regression/scheme-book-scores.ly | 5 ++--- ly/predefined-fretboards-init.ly | 10 ++++------ ly/property-init.ly | 10 ++++------ 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/Documentation/snippets/generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly b/Documentation/snippets/generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly index c2182e123a..ab86d89339 100644 --- a/Documentation/snippets/generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly +++ b/Documentation/snippets/generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly @@ -98,9 +98,8 @@ modified to inser all collected scores so far to the book. (set! pitch (modulo (1+ pitch) 7))))) oneNoteScore = -#(define-music-function (parser location) () - (add-one-note-score parser) - (make-music 'Music 'void #t)) +#(define-void-function (parser location) () + (add-one-note-score parser)) %%% diff --git a/input/regression/figured-bass-slashed-numbers.ly b/input/regression/figured-bass-slashed-numbers.ly index fc5a718b99..73dce5c744 100644 --- a/input/regression/figured-bass-slashed-numbers.ly +++ b/input/regression/figured-bass-slashed-numbers.ly @@ -25,10 +25,9 @@ bassfigures = \figuremode { #(define (adjust-slash-stencil-default num forward stencil mag) stencil) -unsetExceptions = #(define-music-function (parser location) () +unsetExceptions = #(define-void-function (parser location) () ; (set! horizontal-slash-interval horizontal-slash-interval-default) ; (set! adjust-slash-stencil adjust-slash-stencil-default) - (make-music 'Music 'void #t) ) << diff --git a/input/regression/identifier-following-chordmode.ly b/input/regression/identifier-following-chordmode.ly index 7269e91cb4..63790a7b55 100644 --- a/input/regression/identifier-following-chordmode.ly +++ b/input/regression/identifier-following-chordmode.ly @@ -10,10 +10,9 @@ modifier." \version "2.16.0" myDisplayMusic = -#(define-music-function (parser location music) +#(define-void-function (parser location music) (ly:music?) - (display-scheme-music music (current-error-port)) - (make-music 'SequentialMusic 'void #t)) + (display-scheme-music music (current-error-port))) \myDisplayMusic \chordmode { c } diff --git a/input/regression/scheme-book-scores.ly b/input/regression/scheme-book-scores.ly index 678844e2a8..5e24ef5f39 100644 --- a/input/regression/scheme-book-scores.ly +++ b/input/regression/scheme-book-scores.ly @@ -31,9 +31,8 @@ informations from top- and booklevel stack correctly." (set! pitch (modulo (1+ pitch) 7))))) oneNoteScore = -#(define-music-function (parser location) () - (add-one-note-score parser) - (make-music 'Music 'void #t)) +#(define-void-function (parser location) () + (add-one-note-score parser)) %%% diff --git a/ly/predefined-fretboards-init.ly b/ly/predefined-fretboards-init.ly index 71000148b6..705e962872 100644 --- a/ly/predefined-fretboards-init.ly +++ b/ly/predefined-fretboards-init.ly @@ -30,14 +30,13 @@ % chord-shape-table addChordShape = -#(define-music-function (parser location key-symbol tuning shape-definition) +#(define-void-function (parser location key-symbol tuning shape-definition) (symbol? pair? string-or-pair?) (_i "Add chord shape @var{shape-definition} to the @var{chord-shape-table} hash with the key @code{(cons @var{key-symbol} @var{tuning})}.") (hash-set! chord-shape-table (cons key-symbol tuning) - shape-definition) - (make-music 'SequentialMusic 'void #t)) + shape-definition)) #(define (chord-shape shape-code tuning) (get-chord-shape shape-code tuning chord-shape-table)) @@ -62,7 +61,7 @@ table @code{rest}." % fretboard-table storePredefinedDiagram = -#(define-music-function +#(define-void-function (parser location fretboard-table chord tuning diagram-definition) (hash-table? ly:music? pair? string-or-pair?) (_i "Add predefined fret diagram defined by @var{diagram-definition} @@ -75,5 +74,4 @@ storePredefinedDiagram = diagram-definition))) (hash-set! fretboard-table hash-key - verbose-definition) - (make-music 'SequentialMusic 'void #t))) + verbose-definition))) diff --git a/ly/property-init.ly b/ly/property-init.ly index 7bd237b333..2c538ce86c 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -393,19 +393,17 @@ phrasingSlurSolid = %% point and click pointAndClickOn = -#(define-music-function (parser location) () +#(define-void-function (parser location) () (_i "Enable generation of code in final-format (e.g. pdf) files to reference the originating lilypond source statement; this is helpful when developing a score but generates bigger final-format files.") - (ly:set-option 'point-and-click #t) - (make-music 'SequentialMusic 'void #t)) + (ly:set-option 'point-and-click #t)) pointAndClickOff = -#(define-music-function (parser location) () +#(define-void-function (parser location) () (_i "Suppress generating extra code in final-format (e.g. pdf) files to point back to the lilypond source statement.") - (ly:set-option 'point-and-click #f) - (make-music 'SequentialMusic 'void #t)) + (ly:set-option 'point-and-click #f)) pointAndClickTypes = #(define-void-function (parser location types) (symbol-list-or-symbol?) -- 2.39.2