From: David Kastrup Date: Thu, 11 Jun 2015 17:56:50 +0000 (+0200) Subject: Issue 4442/2: Run scripts/auxiliar/update-with-convert-ly.sh -f 2.19.21 X-Git-Tag: release/2.19.22-1~44^2~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7f48cb638958a728209577caa41bbaca8a2e4ef2;p=lilypond.git Issue 4442/2: Run scripts/auxiliar/update-with-convert-ly.sh -f 2.19.21 Also converts scm via find scm -name \*.scm -exec out/bin/convert-ly -en -f 2.19.21 -t 2.19.22 {} + --- diff --git a/Documentation/cs/usage/lilypond-book.itely b/Documentation/cs/usage/lilypond-book.itely index 32e6f4ad05..b1f7c11e31 100644 --- a/Documentation/cs/usage/lilypond-book.itely +++ b/Documentation/cs/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Translators: Pavel Fric @@ -1221,7 +1221,7 @@ sich alle in der selben LilyPond-Datei befinden. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/de/usage/lilypond-book.itely b/Documentation/de/usage/lilypond-book.itely index 225970149f..964bfb70dc 100644 --- a/Documentation/de/usage/lilypond-book.itely +++ b/Documentation/de/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Translators: Reinhold Kainhofer @c Translation checkers: Till Paala @@ -1356,7 +1356,7 @@ sich alle in der selben LilyPond-Datei befinden. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/es/usage/lilypond-book.itely b/Documentation/es/usage/lilypond-book.itely index 4542667022..57c4d249d0 100644 --- a/Documentation/es/usage/lilypond-book.itely +++ b/Documentation/es/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Note: keep this node named so that `info lilypond-book' brings you here. @node lilypond-book @@ -1366,7 +1366,7 @@ mismo archivo de salida de lilypond. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/fr/usage/lilypond-book.itely b/Documentation/fr/usage/lilypond-book.itely index 4cc400482b..bc55619e1a 100644 --- a/Documentation/fr/usage/lilypond-book.itely +++ b/Documentation/fr/usage/lilypond-book.itely @@ -9,7 +9,7 @@ @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Translators: Jean-Charles Malahieude @c Translation checkers: @@ -1413,7 +1413,7 @@ comportant tous les mouvement de la partition. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/hu/usage/lilypond-book.itely b/Documentation/hu/usage/lilypond-book.itely index 497bdaf961..24268b3b05 100644 --- a/Documentation/hu/usage/lilypond-book.itely +++ b/Documentation/hu/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Note: keep this node named so that `info lilypond-book' brings you here. @node lilypond-book @@ -1180,7 +1180,7 @@ output file. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/it/usage/lilypond-book.itely b/Documentation/it/usage/lilypond-book.itely index 2495491651..c5bfde4c6b 100644 --- a/Documentation/it/usage/lilypond-book.itely +++ b/Documentation/it/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Note: keep this node named so that `info lilypond-book' brings you here. @node lilypond-book @@ -1328,7 +1328,7 @@ di output di lilypond. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/ja/usage/lilypond-book.itely b/Documentation/ja/usage/lilypond-book.itely index ccb88627a4..41f141d5ad 100644 --- a/Documentation/ja/usage/lilypond-book.itely +++ b/Documentation/ja/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Translators: Yoshiki Sawada @@ -1345,7 +1345,7 @@ unterst__tzt werden. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/Documentation/snippets/clip-systems.ly b/Documentation/snippets/clip-systems.ly index b7be958297..736586bb94 100644 --- a/Documentation/snippets/clip-systems.ly +++ b/Documentation/snippets/clip-systems.ly @@ -4,7 +4,7 @@ %% and then run scripts/auxiliar/makelsr.py %% %% This file is in the public domain. -\version "2.18.0" +\version "2.19.22" \header { lsrtags = "paper-and-layout" @@ -88,7 +88,7 @@ origScore = \score { \markup { from-2.0.1-to-4.0.1-clip.eps } \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" - (ly:parser-output-name parser)) } + (ly:parser-output-name)) } } } } 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 6992cce160..b710ea507d 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 @@ -13,8 +13,7 @@ A lilypond score internally is just a Scheme expression, generated by the lilypond parser. Using scheme, one can also automatically generate a score without an input file. If you have the music expression in -scheme, a score can be generated by simply calling (scorify-music music -parser) on your music. This will generate a score object, for which you +scheme, a score can be generated by simply calling (scorify-music music) on your music. This will generate a score object, for which you can then set a custom layout block with (let* ((layout (ly:output-def-clone $defaultlayout))) ; modify the layout here, then assign it: @@ -23,8 +22,8 @@ can then set a custom layout block with (let* ((layout Finally, all you have to do it to pass this score to lilypond for -typesetting. This snippet defines functions @code{(add-score parser -score)}, @code{(add-text parser text)} and @code{(add-music parser +typesetting. This snippet defines functions @code{(add-score +score)}, @code{(add-text text)} and @code{(add-music music)} to pass a complete score, some markup or some music to lilypond for typesetting. @@ -40,34 +39,33 @@ modified to inser all collected scores so far to the book. } % begin verbatim %% -#(define-public (add-score parser score) - (ly:parser-define! parser 'toplevel-scores - (cons score (ly:parser-lookup parser 'toplevel-scores)))) +#(define-public (add-score score) + (ly:parser-define! 'toplevel-scores + (cons score (ly:parser-lookup 'toplevel-scores)))) -#(define-public (add-text parser text) - (add-score parser (list text))) +#(define-public (add-text text) + (add-score (list text))) -#(define-public (add-music parser music) +#(define-public (add-music music) (collect-music-aux (lambda (score) - (add-score parser score)) - parser + (add-score score)) music)) -#(define-public (toplevel-book-handler parser book) +#(define-public (toplevel-book-handler book) (map (lambda (score) (ly:book-add-score! book score)) - (reverse! (ly:parser-lookup parser 'toplevel-scores))) - (ly:parser-define! parser 'toplevel-scores (list)) - (print-book-with-defaults parser book)) + (reverse! (ly:parser-lookup 'toplevel-scores))) + (ly:parser-define! 'toplevel-scores (list)) + (print-book-with-defaults book)) #(define-public (book-score-handler book score) - (add-score parser score)) + (add-score score)) #(define-public (book-text-handler book text) - (add-text parser text)) + (add-text text)) -#(define-public (book-music-handler parser book music) - (add-music parser music)) +#(define-public (book-music-handler book music) + (add-music music)) %%% @@ -81,7 +79,7 @@ modified to inser all collected scores so far to the book. 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1/1) 'pitch (ly:make-pitch 0 pitch 0))))) - (score (scorify-music music parser)) + (score (scorify-music music)) (layout (ly:output-def-clone $defaultlayout)) (note-name (case pitch ((0) "do") @@ -94,8 +92,8 @@ modified to inser all collected scores so far to the book. (else "huh"))) (title (markup #:large #:line ("Score with a" note-name)))) (ly:score-add-output-def! score layout) - (add-text parser title) - (add-score parser score)) + (add-text title) + (add-score score)) (set! pitch (modulo (1+ pitch) 7))))) oneNoteScore = diff --git a/Documentation/usage/lilypond-book.itely b/Documentation/usage/lilypond-book.itely index d8e55e1832..9f4f00a936 100644 --- a/Documentation/usage/lilypond-book.itely +++ b/Documentation/usage/lilypond-book.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.19.21" +@c \version "2.19.22" @c Note: keep this node named so that `info lilypond-book' brings you here. @node lilypond-book @@ -1312,7 +1312,7 @@ output file. (format #f "~a, section, 1, @{~a@}, ~a" page text label)))) (formatted-toc-items (map format-line (toc-items))) (whole-string (string-join formatted-toc-items ",\n")) - (output-name (ly:parser-output-name parser)) + (output-name (ly:parser-output-name)) (outfilename (format "~a.toc" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) diff --git a/input/regression/backend-svg.ly b/input/regression/backend-svg.ly index f74f65852c..ad0c30036c 100644 --- a/input/regression/backend-svg.ly +++ b/input/regression/backend-svg.ly @@ -1,4 +1,4 @@ -\version "2.16.0" +\version "2.19.22" %{ #(ly:set-option 'backend 'svg) #(set! output-count 1) @@ -7,7 +7,7 @@ \include "typography-demo.ly" -#(define outname (ly:parser-output-name parser)) +#(define outname (ly:parser-output-name)) #(ly:set-option 'backend 'eps) diff --git a/input/regression/clip-systems.ly b/input/regression/clip-systems.ly index 330a4e36f7..b13cc713fe 100644 --- a/input/regression/clip-systems.ly +++ b/input/regression/clip-systems.ly @@ -19,7 +19,7 @@ The result will be files named } -\version "2.19.21" +\version "2.19.22" #(ly:set-option 'clip-systems) #(define output-suffix "1") @@ -78,7 +78,7 @@ origScore = \score{ \score { \lyrics { \markup { from-2.0.1-to-4.0.1-clip.eps } - \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name parser)) } + \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name)) } } } } diff --git a/input/regression/display-lily-tests.ly b/input/regression/display-lily-tests.ly index 8a6a1a5c94..128c237d6d 100644 --- a/input/regression/display-lily-tests.ly +++ b/input/regression/display-lily-tests.ly @@ -15,7 +15,7 @@ (char=? (peek-char port) #\])) (read-char port)) (display c out)))))) - `(let* ((parser-clone (ly:parser-clone parser)) + `(let* ((parser-clone (ly:parser-clone)) (input-str (string-trim-both ,lily-string)) (music (ly:parse-string-expression parser-clone input-str)) (result-str (string-trim-both (music->lily-string music parser-clone)))) diff --git a/input/regression/general-scheme-bindings.ly b/input/regression/general-scheme-bindings.ly index bf00be2fc4..b810d9b2e7 100644 --- a/input/regression/general-scheme-bindings.ly +++ b/input/regression/general-scheme-bindings.ly @@ -5,7 +5,7 @@ } -\version "2.17.11" +\version "2.19.22" %% todo : use macro, to show the statement tested. #(ly:progress "~a\n" (ly:expand-environment "${HOME} $HOME $$ ")) @@ -15,7 +15,7 @@ %% #(ly:font-config-display-fonts) #(ly:progress "~A\n" (ly:duration->string (ly:make-duration 2 2 3/7))) -#(ly:parser-parse-string (ly:parser-clone parser) "foo = #1 #(ly:progress \"hello there\n\")") +#(ly:parser-parse-string (ly:parser-clone) "foo = #1 #(ly:progress \"hello there\n\")") #(ly:progress "~a\n" (ly:truncate-list! (iota 5) 10)) #(ly:progress "~a\n" (ly:truncate-list! (iota 10) 5)) diff --git a/input/regression/include-string.ly b/input/regression/include-string.ly index 619e1b4ee0..6584a9787c 100644 --- a/input/regression/include-string.ly +++ b/input/regression/include-string.ly @@ -1,8 +1,8 @@ -\version "2.19.21" +\version "2.19.22" \header { texidoc = "@code{ly:parser-include-string} should include the current string like a file @code{\\include}." } -#(ly:parser-include-string parser "\\relative { a4 b c d }") +#(ly:parser-include-string "\\relative { a4 b c d }") diff --git a/input/regression/note-names.ly b/input/regression/note-names.ly index 72cbc0c8bb..3a50f48384 100644 --- a/input/regression/note-names.ly +++ b/input/regression/note-names.ly @@ -1,4 +1,4 @@ -\version "2.19.21" +\version "2.19.22" \header { texidoc = "Various languages are supported for note names input. @@ -18,7 +18,7 @@ and doesn't break point-and-click abilities. %% and the parser note names: #(begin (set! pitchnames (ly:assoc-get 'nederlands language-pitch-names)) - (ly:parser-set-note-names parser pitchnames)) + (ly:parser-set-note-names pitchnames)) bes4 a g fis %% The \language command acts in the same way: diff --git a/input/regression/optional-args-backup.ly b/input/regression/optional-args-backup.ly index 63650fdec2..ea7db103c2 100644 --- a/input/regression/optional-args-backup.ly +++ b/input/regression/optional-args-backup.ly @@ -19,7 +19,7 @@ separate arguments." test=#(define-void-function (expect . rest) (list? (string? "def1") (integer? "def2") (fraction? "def3") integer?) (if (not (equal? expect rest)) - (ly:parser-error (*parser*) + (ly:parser-error (format #f "Expected ~s, got ~s.\n" expect rest) (*location*)))) diff --git a/input/regression/optional-args-predicate.ly b/input/regression/optional-args-predicate.ly index c8b4668ca1..49537ce46f 100644 --- a/input/regression/optional-args-predicate.ly +++ b/input/regression/optional-args-predicate.ly @@ -9,7 +9,7 @@ test=#(define-scheme-function (str int frac exp) ((string? "def1") (integer? "def2") (number-pair? "def3") list?) (if (not (equal? (list str int frac) exp)) - (ly:parser-error (*parser*) + (ly:parser-error (format #f "Expected ~a, got ~a.\n" exp (list str int frac)) (*location*)))) diff --git a/input/regression/scheme-book-scores.ly b/input/regression/scheme-book-scores.ly index cdc2c7fcdc..ec75de3573 100644 --- a/input/regression/scheme-book-scores.ly +++ b/input/regression/scheme-book-scores.ly @@ -21,13 +21,13 @@ informations from top- and booklevel stack correctly." 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1/1) 'pitch scmpitch)))) - (score (scorify-music music parser)) + (score (scorify-music music)) (layout (ly:output-def-clone $defaultlayout)) (desc (markup #:large #:line ((ly:format "Score with a ~a" - (note-name->lily-string scmpitch parser)))))) + (note-name->lily-string scmpitch)))))) (ly:score-add-output-def! score layout) - (add-text parser desc) - (add-score parser score)) + (add-text desc) + (add-score score)) (set! pitch (modulo (1+ pitch) 7))))) oneNoteScore = diff --git a/ly/articulate.ly b/ly/articulate.ly index 5b7ab7234f..6ae8e68b5b 100644 --- a/ly/articulate.ly +++ b/ly/articulate.ly @@ -878,7 +878,7 @@ articulate = #(define-music-function (music) (lambda () (music-map ac:articulate-chord - (ac:unfoldMusic (event-chord-wrap! music (*parser*))))) + (ac:unfoldMusic (event-chord-wrap! music)))) (lambda () (or (= ac:stealForward 0) (begin @@ -894,8 +894,8 @@ afterGrace = (main grace) (ly:music? ly:music?) - (set! main (event-chord-wrap! main (*parser*))) - (set! grace (event-chord-wrap! grace (*parser*))) + (set! main (event-chord-wrap! main)) + (set! grace (event-chord-wrap! grace)) (let* ((main-length (ly:music-length main)) (grace-orig-length (ly:music-length grace)) @@ -920,8 +920,8 @@ afterGrace = appoggiatura = #(define-music-function (grace main) (ly:music? ly:music?) - (set! grace (event-chord-wrap! grace (*parser*))) - (set! main (event-chord-wrap! main (*parser*))) + (set! grace (event-chord-wrap! grace)) + (set! main (event-chord-wrap! main)) (let* ((maindur (ly:music-length main)) (grace-orig-len (ly:music-length grace)) (main-orig-len (ly:music-length main)) diff --git a/ly/bagpipe.ly b/ly/bagpipe.ly index 1c239246a0..9c0662c59a 100644 --- a/ly/bagpipe.ly +++ b/ly/bagpipe.ly @@ -34,7 +34,7 @@ pitchnamesBagpipe = #`( (C . ,(ly:make-pitch 2 0 SHARP)) ) pitchnames = \pitchnamesBagpipe -#(ly:parser-set-note-names parser pitchnames) +#(ly:parser-set-note-names pitchnames) % Bagpipe music is written in something like D major. If we use % flattened notes, the flat should be shown on all instances. diff --git a/ly/base-tkit.ly b/ly/base-tkit.ly index 6061475acc..ba5982c122 100644 --- a/ly/base-tkit.ly +++ b/ly/base-tkit.ly @@ -1,4 +1,4 @@ -%\version "2.19.19" +%\version "2.19.22" %%% These are the general utility functions and storage % used by the built-in templates and the template kits @@ -8,7 +8,7 @@ #(define (get-id str) "Return the identifier with the value str" - (ly:parser-lookup parser (string->symbol str))) + (ly:parser-lookup (string->symbol str))) #(define (make-id a b) "Return the identifier formed from concatenating the @@ -34,8 +34,8 @@ (for-each (lambda (id) (define sym (string->symbol id)) - (if (null? (ly:parser-lookup parser sym)) - (ly:parser-define! parser sym #f))) + (if (null? (ly:parser-lookup sym)) + (ly:parser-define! sym #f))) ids)) % Define the lists used to hold the names and diff --git a/ly/chord-repetition-init.ly b/ly/chord-repetition-init.ly index 72c561a7e6..1e3c7ad105 100644 --- a/ly/chord-repetition-init.ly +++ b/ly/chord-repetition-init.ly @@ -37,5 +37,5 @@ tabChordRepetition = #(define-void-function () () (_i "Include the string and fingering information in a chord repetition. This function is deprecated; try using @code{\\tabChordRepeats} instead.") - (ly:parser-define! (*parser*) '$chord-repeat-events + (ly:parser-define! '$chord-repeat-events '(string-number-event fingering-event))) diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index 89a9a893dc..5ce305aa5c 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -16,7 +16,7 @@ %%%% You should have received a copy of the GNU General Public License %%%% along with LilyPond. If not, see . -\version "2.17.25" +\version "2.19.22" %% named durations breve = #(ly:make-duration -1 0) @@ -28,7 +28,7 @@ maxima = #(ly:make-duration -3 0) %% default note names are dutch #(set! default-language "nederlands") -#(note-names-language parser default-language) +#(note-names-language default-language) \include "drumpitch-init.ly" \include "chord-modifiers-init.ly" diff --git a/ly/graphviz-init.ly b/ly/graphviz-init.ly index d8735e8f0e..c8d0dfe2c3 100644 --- a/ly/graphviz-init.ly +++ b/ly/graphviz-init.ly @@ -1,4 +1,4 @@ -\version "2.16.0" +\version "2.19.22" #(use-modules (scm graphviz)) @@ -22,7 +22,7 @@ #(define (whitelist-grob sym) (set! grob-whitelist (cons sym grob-whitelist))) -#(define graph (make-empty-graph (ly:parser-output-name parser))) +#(define graph (make-empty-graph (ly:parser-output-name))) #(define (grob-name g) (let* ((meta (ly:grob-property g 'meta)) diff --git a/ly/init.ly b/ly/init.ly index 5075d716f5..f906273c7f 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -4,7 +4,7 @@ #(if (and #t (defined? 'set-debug-cell-accesses!)) (set-debug-cell-accesses! 5000)) -\version "2.16.0" +\version "2.19.22" #(if (guile-v2) (use-modules (ice-9 curried-definitions))) @@ -17,10 +17,10 @@ ;; function has not actually started. A parser clone, in contrast, ;; can run and complete synchronously and shares the module with ;; the current parser. - (ly:parser-parse-string (ly:parser-clone (*parser*)) + (ly:parser-parse-string (ly:parser-clone) "\\include \"declarations-init.ly\""))) -#(note-names-language (*parser*) default-language) +#(note-names-language default-language) #(define toplevel-scores (list)) #(define toplevel-bookparts (list)) @@ -37,7 +37,7 @@ #(use-modules (ice-9 pretty-print)) $(if (ly:get-option 'include-settings) - (ly:parser-include-string (*parser*) + (ly:parser-include-string (format #f "\\include \"~a\"" (ly:get-option 'include-settings)))) \maininput @@ -75,7 +75,7 @@ $(if (ly:get-option 'include-settings) (set! toplevel-scores (list)) (book-handler (*parser*) book))))) -#(if (eq? expect-error (ly:parser-has-error? (*parser*))) - (ly:parser-clear-error (*parser*)) +#(if (eq? expect-error (ly:parser-has-error?)) + (ly:parser-clear-error) (if expect-error - (ly:parser-error (*parser*) (_ "expected error, but none found")))) + (ly:parser-error (_ "expected error, but none found")))) diff --git a/ly/makam.ly b/ly/makam.ly index e97f2c8978..7f5f8cc783 100644 --- a/ly/makam.ly +++ b/ly/makam.ly @@ -1,4 +1,4 @@ -\version "2.17.6" +\version "2.19.22" %{ @@ -117,7 +117,7 @@ makamPitchNames = #`( %% set pitch names. pitchnames = \makamPitchNames -#(ly:parser-set-note-names parser makamPitchNames) +#(ly:parser-set-note-names makamPitchNames) #(define eksikMirroredSlashedFlat (if (defined? 'eksikMirroredSlashedFlat) diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index b1b07b4144..563f97dfcb 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -55,7 +55,7 @@ addQuote = #(define-void-function (name music) (string? ly:music?) (_i "Define @var{music} as a quotable music expression named @var{name}") - (add-quotable (*parser*) name music)) + (add-quotable name music)) %% keep these two together afterGraceFraction = #(cons 6 8) @@ -63,7 +63,7 @@ afterGrace = #(define-music-function (main grace) (ly:music? ly:music?) (_i "Create @var{grace} note(s) after a @var{main} music expression.") (let ((main-length (ly:music-length main)) - (fraction (ly:parser-lookup (*parser*) 'afterGraceFraction))) + (fraction (ly:parser-lookup 'afterGraceFraction))) (make-simultaneous-music (list main @@ -108,7 +108,7 @@ form of a spanner event, @var{property} may also have the form (begin (ly:music-warning item (_ "not a spanner")) item)) - (let* ((p (check-grob-path item (*parser*) (*location*) + (let* ((p (check-grob-path item (*location*) #:default 'Bottom #:min 2 #:max 2)) @@ -177,7 +177,7 @@ assertBeamSlope = autochange = #(define-music-function (music) (ly:music?) (_i "Make voices that switch between staves automatically") - (make-autochange-music (*parser*) music)) + (make-autochange-music music)) @@ -238,13 +238,13 @@ bendAfter = bookOutputName = #(define-void-function (newfilename) (string?) (_i "Direct output for the current book block to @var{newfilename}.") - (set! (paper-variable (*parser*) #f 'output-filename) newfilename)) + (set! (paper-variable #f 'output-filename) newfilename)) bookOutputSuffix = #(define-void-function (newsuffix) (string?) (_i "Set the output filename suffix for the current book block to @var{newsuffix}.") - (set! (paper-variable (*parser*) #f 'output-suffix) newsuffix)) + (set! (paper-variable #f 'output-suffix) newsuffix)) %% \breathe is defined as a music function rather than an event identifier to %% ensure it gets useful input location information: as an event identifier, @@ -352,7 +352,7 @@ displayLilyMusic = to @var{port}, defaulting to the console.") (let ((port (or port (current-output-port)))) (newline port) - (display-lily-music music (*parser*) port)) + (display-lily-music music port)) music) displayMusic = @@ -399,7 +399,7 @@ eventChords = (_i "Compatibility function wrapping @code{EventChord} around isolated rhythmic events occuring since version 2.15.28, after expanding repeat chords @samp{q}.") - (event-chord-wrap! music (*parser*))) + (event-chord-wrap! music)) featherDurations= #(define-music-function (factor argument) (ly:moment? ly:music?) @@ -590,7 +590,7 @@ key = If both are null, just generate @code{KeyChangeEvent}.") (cond ((null? tonic) (make-music 'KeyChangeEvent)) ((null? pitch-alist) - (ly:parser-error (*parser*) (_ "second argument must be pitch list") + (ly:parser-error (_ "second argument must be pitch list") (*location*)) (make-music 'SequentialMusic 'void #t)) (else @@ -626,13 +626,13 @@ label = language = #(define-void-function (language) (string?) (_i "Set note names for language @var{language}.") - (note-names-language (*parser*) language)) + (note-names-language language)) languageSaveAndChange = #(define-void-function (language) (string?) (_i "Store the previous pitchnames alist, and set a new one.") (set! previous-pitchnames pitchnames) - (note-names-language (*parser*) language)) + (note-names-language language)) languageRestore = #(define-void-function () () @@ -640,7 +640,7 @@ languageRestore = (if previous-pitchnames (begin (set! pitchnames previous-pitchnames) - (ly:parser-set-note-names (*parser*) pitchnames)) + (ly:parser-set-note-names pitchnames)) (ly:input-warning (*location*) (_ "No other language was defined previously. Ignoring.")))) @@ -870,8 +870,7 @@ appropriate tweak applied.") (let ((prop-path (check-grob-path (if (symbol? property) (list property) - property) - (*parser*) (*location*) + property) (*location*) #:start 1 #:default #t #:min 2 #:max 2))) (if prop-path ; If the head of the grob property path is a symbol--i.e., @@ -888,8 +887,7 @@ appropriate tweak applied.") (append item (if (symbol? property) (list property) - property)) - (*parser*) (*location*) + property)) (*location*) #:default 'Bottom #:min 3 #:max 3))) (if prop-path #{ @@ -957,7 +955,7 @@ overrideProperty = @var{value}. @var{grob-property-path} is a symbol list of the form @code{Context.GrobName.property} or @code{GrobName.property}, possibly with subproperties given as well.") - (let ((p (check-grob-path grob-property-path (*parser*) (*location*) + (let ((p (check-grob-path grob-property-path (*location*) #:default 'Bottom #:min 3))) (if p @@ -1137,7 +1135,7 @@ change to the following voice." ;; ;; bind voice identifiers to the voices (for-each (lambda (voice-id voice) - (ly:parser-define! (*parser*) voice-id voice)) + (ly:parser-define! voice-id voice)) voice-ids voices) (ly:music-warning music (_ "ignoring parallel music without barchecks"))))) @@ -1159,14 +1157,12 @@ parenthesize = (set! (ly:music-property arg 'parenthesize) #t)) arg) -#(define (make-directed-part-combine-music - parser direction chord-range part1 part2 +#(define (make-directed-part-combine-music direction chord-range part1 part2 one-context-settings two-context-settings shared-context-settings) - (let* ((pc-music (make-part-combine-music - parser (list part1 part2) direction chord-range)) + (let* ((pc-music (make-part-combine-music (list part1 part2) direction chord-range)) (L1 (ly:music-length part1)) (L2 (ly:music-length part2)) ;; keep the contexts alive for the full duration @@ -1192,7 +1188,7 @@ a music expression containing simultaneous voices, where @var{part1} and @var{part2} are combined into one voice where appropriate. Optional @var{chord-range} sets the distance in steps between notes that may be combined into a chord or unison.") - (make-directed-part-combine-music (*parser*) #f chord-range part1 part2 + (make-directed-part-combine-music #f chord-range part1 part2 #{ \with { \voiceOne \override DynamicLineSpanner.direction = #UP } #} #{ \with { \voiceTwo \override DynamicLineSpanner.direction = #DOWN } #} #{ #} )) @@ -1202,7 +1198,7 @@ partcombineUp = ((number-pair? '(0 . 8)) ly:music? ly:music?) (_i "Take the music in @var{part1} and @var{part2} and typeset so that they share a staff with stems directed upward.") - (make-directed-part-combine-music (*parser*) UP chord-range part1 part2 + (make-directed-part-combine-music UP chord-range part1 part2 #{ \with { \voiceOne \override DynamicLineSpanner.direction = #UP } #} #{ \with { \voiceThree \override DynamicLineSpanner.direction = #UP } #} #{ \with { \voiceOne \override DynamicLineSpanner.direction = #UP } #} )) @@ -1212,7 +1208,7 @@ partcombineDown = ((number-pair? '(0 . 8)) ly:music? ly:music?) (_i "Take the music in @var{part1} and @var{part2} and typeset so that they share a staff with stems directed downward.") - (make-directed-part-combine-music (*parser*) DOWN chord-range part1 part2 + (make-directed-part-combine-music DOWN chord-range part1 part2 #{ \with { \voiceFour \override DynamicLineSpanner.direction = #DOWN } #} #{ \with { \voiceTwo \override DynamicLineSpanner.direction = #DOWN } #} #{ \with { \voiceTwo \override DynamicLineSpanner.direction = #DOWN } #} )) @@ -1541,7 +1537,7 @@ tagGroup = (_i "Define a tag group comprising the symbols in the symbol list @var{tags}. Tag groups must not overlap.") (let ((err (define-tag-group tags))) - (if err (ly:parser-error (*parser*) err (*location*))))) + (if err (ly:parser-error err (*location*))))) temporary = #(define-music-function (music) @@ -1705,7 +1701,7 @@ convenient. @var{prop} can contain additional elements in which case a nested property (inside of an alist) is tweaked.") (if (ly:music? item) - (let ((p (check-grob-path prop (*parser*) (*location*) + (let ((p (check-grob-path prop (*location*) #:start 1 #:default #t #:min 2))) @@ -1722,8 +1718,7 @@ property (inside of an alist) is tweaked.") ;; out on its own, but this way we should get better error ;; diagnostics. (let ((p (check-grob-path - (append item (if (symbol? prop) (list prop) prop)) - (*parser*) (*location*) + (append item (if (symbol? prop) (list prop) prop)) (*location*) #:default 'Bottom #:min 3))) (if p #{ \override #p = #value #} diff --git a/ly/property-init.ly b/ly/property-init.ly index 7a06995ffe..4a11fcf4d7 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -26,7 +26,7 @@ piano styles, which use @samp{GrandStaff} as a context." ) ((1) (set-accidental-style (car style))) ((2) (set-accidental-style (cadr style) (car style))) (else - (ly:parser-error (*parser*) (_ "not an accidental style") + (ly:parser-error (_ "not an accidental style") (*location*)) (make-music 'Music)))) diff --git a/ly/string-tunings-init.ly b/ly/string-tunings-init.ly index 5503416966..927bbae6b2 100644 --- a/ly/string-tunings-init.ly +++ b/ly/string-tunings-init.ly @@ -42,7 +42,7 @@ makeDefaultStringTuning = (_i "This defines a string tuning @var{symbol} via a list of @var{pitches}. The @var{symbol} also gets registered in @code{defaultStringTunings} for documentation purposes.") - (ly:parser-define! (*parser*) symbol pitches) + (ly:parser-define! symbol pitches) (set! defaultStringTunings (acons symbol pitches defaultStringTunings))) %% guitar tunings diff --git a/scm/autochange.scm b/scm/autochange.scm index b358c22b53..a6c78f7bbc 100644 --- a/scm/autochange.scm +++ b/scm/autochange.scm @@ -3,7 +3,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; autochange.scm - fairly related to part combining. -(define-public (make-autochange-music parser music) +(define-public (make-autochange-music music) (define (generate-split-list change-moment event-list acc) (if (null? event-list) acc @@ -33,7 +33,7 @@ (let* ((m (make-music 'AutoChangeMusic)) (m1 (make-non-relative-music (context-spec-music music 'Voice "one"))) (context-list (recording-group-emulate music - (ly:parser-lookup parser 'partCombineListener))) + (ly:parser-lookup 'partCombineListener))) (evs (car context-list)) (rev (reverse! (cdar context-list))) (split (reverse! (generate-split-list diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index e2412367b8..6a428dd5d3 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -83,13 +83,13 @@ expression." (if (and (car alist) (test item (cdar alist))) (set! result (car alist))))) -(define-public (note-name->lily-string ly-pitch parser) +(define-public (note-name->lily-string ly-pitch) ;; here we define a custom pitch= function, since we do not want to ;; test whether octaves are also equal. (otherwise, we would be using equal?) (define (pitch= pitch1 pitch2) (and (= (ly:pitch-notename pitch1) (ly:pitch-notename pitch2)) (= (ly:pitch-alteration pitch1) (ly:pitch-alteration pitch2)))) - (let* ((pitches (if parser (ly:parser-lookup parser 'pitchnames) + (let* ((pitches (if parser (ly:parser-lookup 'pitchnames) (assoc-get (string->symbol default-language) language-pitch-names '()))) (result (rassoc ly-pitch pitches pitch=))) @@ -227,7 +227,7 @@ expression." (define-display-method GraceMusic (expr parser) (format #f "\\grace ~a" - (music->lily-string (ly:music-property expr 'element) parser))) + (music->lily-string (ly:music-property expr 'element)))) ;; \acciaccatura \appoggiatura \grace ;; TODO: it would be better to compare ?start and ?stop @@ -261,7 +261,7 @@ expression." ((music 'SlurEvent span-direction STOP)))))) - (format #f "\\appoggiatura ~a" (music->lily-string ?music parser)))))) + (format #f "\\appoggiatura ~a" (music->lily-string ?music)))))) (define-extra-display-method GraceMusic (expr parser) @@ -306,7 +306,7 @@ expression." ((music 'SlurEvent span-direction STOP)))))) - (format #f "\\acciaccatura ~a" (music->lily-string ?music parser)))))) + (format #f "\\acciaccatura ~a" (music->lily-string ?music)))))) (define-extra-display-method GraceMusic (expr parser) "Display method for grace." @@ -321,7 +321,7 @@ expression." ;; startGraceMusic stopGraceMusic (and (null? (ly:music-property ?start 'elements)) (null? (ly:music-property ?stop 'elements)) - (format #f "\\grace ~a" (music->lily-string ?music parser))))) + (format #f "\\grace ~a" (music->lily-string ?music))))) ;;; ;;; Music sequences @@ -377,7 +377,7 @@ expression." (if force-line-break (+ 2 (*indent*)) 1) (parameterize ((*indent* (+ 2 (*indent*)))) (map-in-order (lambda (music) - (music->lily-string music parser)) + (music->lily-string music)) elements)) (if force-line-break 1 0) (if force-line-break (*indent*) 1)))) @@ -386,7 +386,7 @@ expression." (parameterize ((*indent* (+ 3 (*indent*)))) (format #f "<< ~{~a ~}>>" (map-in-order (lambda (music) - (music->lily-string music parser)) + (music->lily-string music)) (ly:music-property sim 'elements))))) (define-extra-display-method SimultaneousMusic (expr parser) @@ -400,8 +400,8 @@ Otherwise, return #f." (music 'GraceMusic element ?grace)))))) (format #f "\\afterGrace ~a ~a" - (music->lily-string ?before-grace parser) - (music->lily-string ?grace parser)))) + (music->lily-string ?before-grace) + (music->lily-string ?grace)))) ;;; ;;; Chords @@ -435,13 +435,13 @@ Otherwise, return #f." (parameterize ((*omit-duration* #t)) (map-in-order (lambda (music) - (music->lily-string music parser)) + (music->lily-string music)) chord-elements)) duration (map-in-order (lambda (music) (list (post-event? music) - (music->lily-string music parser))) + (music->lily-string music))) other-elements)))) ((ly:duration? chord-repeat) (let ((duration (duration->lily-string chord-repeat))) @@ -450,25 +450,25 @@ Otherwise, return #f." (map-in-order (lambda (music) (list (post-event? music) - (music->lily-string music parser))) + (music->lily-string music))) other-elements)))) ((and (= 1 (length other-elements)) (not (post-event? (car other-elements)))) - (format #f (music->lily-string (car other-elements) parser))) + (format #f (music->lily-string (car other-elements)))) (else (format #f "< >~:{~:[-~;~]~a~^ ~}" (map-in-order (lambda (music) (list (post-event? music) - (music->lily-string music parser))) + (music->lily-string music))) other-elements)))))))) (define-display-method MultiMeasureRestMusic (mmrest parser) (format #f "R~a~{~a~^ ~}" (duration->lily-string (ly:music-property mmrest 'duration)) (map-in-order (lambda (music) - (music->lily-string music parser)) + (music->lily-string music)) (ly:music-property mmrest 'articulations)))) (define-display-method SkipMusic (skip parser) @@ -483,7 +483,7 @@ Otherwise, return #f." (define (simple-note->lily-string event parser) (format #f "~a~a~a~a~a~a~:{~:[-~;~]~a~}" ; pitchname octave !? octave-check duration optional_rest articulations - (note-name->lily-string (ly:music-property event 'pitch) parser) + (note-name->lily-string (ly:music-property event 'pitch)) (octave->lily-string (ly:music-property event 'pitch)) (let ((forced (ly:music-property event 'force-accidental)) (cautionary (ly:music-property event 'cautionary))) @@ -508,7 +508,7 @@ Otherwise, return #f." (map-in-order (lambda (event) (list (post-event? event) - (music->lily-string event parser))) + (music->lily-string event))) (ly:music-property event 'articulations)))) (define-display-method NoteEvent (note parser) @@ -518,7 +518,7 @@ Otherwise, return #f." (format #f "~a~a~{~a~}" (ly:music-property note 'drum-type) (duration->lily-string (ly:music-property note 'duration)) (map-in-order (lambda (event) - (music->lily-string event parser)) + (music->lily-string event)) (ly:music-property note 'articulations)))) (else ;; pure duration @@ -526,7 +526,7 @@ Otherwise, return #f." (duration->lily-string (ly:music-property note 'duration) #:force-duration #t) (map-in-order (lambda (event) - (music->lily-string event parser)) + (music->lily-string event)) (ly:music-property note 'articulations)))))) (define-display-method ClusterNoteEvent (note parser) @@ -538,7 +538,7 @@ Otherwise, return #f." (format #f "r~a~{~a~}" (duration->lily-string (ly:music-property rest 'duration)) (map-in-order (lambda (event) - (music->lily-string event parser)) + (music->lily-string event)) (ly:music-property rest 'articulations))))) (define-display-method MultiMeasureRestEvent (rest parser) @@ -548,11 +548,11 @@ Otherwise, return #f." (format #f "s~a~{~a~}" (duration->lily-string (ly:music-property rest 'duration)) (map-in-order (lambda (event) - (music->lily-string event parser)) + (music->lily-string event)) (ly:music-property rest 'articulations)))) (define-display-method RepeatedChord (chord parser) - (music->lily-string (ly:music-property chord 'element) parser)) + (music->lily-string (ly:music-property chord 'element))) (define-display-method MarkEvent (mark parser) (let ((label (ly:music-property mark 'label))) @@ -569,10 +569,10 @@ Otherwise, return #f." (let ((c-pitch-alist (ly:transpose-key-alist pitch-alist (ly:pitch-diff (ly:make-pitch 0 0 0) tonic)))) (format #f "\\key ~a \\~a~a" - (note-name->lily-string (ly:music-property key 'tonic) parser) + (note-name->lily-string (ly:music-property key 'tonic)) (any (lambda (mode) (if (and parser - (equal? (ly:parser-lookup parser mode) c-pitch-alist)) + (equal? (ly:parser-lookup mode) c-pitch-alist)) (symbol->string mode) #f)) '(major minor ionian locrian aeolian mixolydian lydian phrygian dorian)) @@ -581,7 +581,7 @@ Otherwise, return #f." (define-display-method RelativeOctaveCheck (octave parser) (let ((pitch (ly:music-property octave 'pitch))) (format #f "\\octaveCheck ~a~a" - (note-name->lily-string pitch parser) + (note-name->lily-string pitch) (octave->lily-string pitch)))) (define-display-method VoiceSeparator (sep parser) @@ -634,7 +634,7 @@ Otherwise, return #f." (format #f "~s" string) string)) (markup->lily-string text))) - (map-in-order (lambda (m) (music->lily-string m parser)) + (map-in-order (lambda (m) (music->lily-string m)) (ly:music-property lyric 'articulations)))) (define-display-method BreathingEvent (event parser) @@ -646,7 +646,7 @@ Otherwise, return #f." (define-display-method AutoChangeMusic (m parser) (format #f "\\autochange ~a" - (music->lily-string (ly:music-property m 'element) parser))) + (music->lily-string (ly:music-property m 'element)))) (define-display-method ContextChange (m parser) (format #f "\\change ~a = \"~a\"" @@ -671,14 +671,14 @@ Otherwise, return #f." den num formatted-span - (music->lily-string (ly:music-property times 'element) parser))))) + (music->lily-string (ly:music-property times 'element)))))) result))) (define-display-method RelativeOctaveMusic (m parser) - (music->lily-string (ly:music-property m 'element) parser)) + (music->lily-string (ly:music-property m 'element))) (define-display-method TransposedMusic (m parser) - (music->lily-string (ly:music-property m 'element) parser)) + (music->lily-string (ly:music-property m 'element))) ;;; ;;; Repeats @@ -687,7 +687,7 @@ Otherwise, return #f." (define-display-method AlternativeEvent (alternative parser) "") (define (repeat->lily-string expr repeat-type parser) - (let* ((main (music->lily-string (ly:music-property expr 'element) parser))) + (let* ((main (music->lily-string (ly:music-property expr 'element)))) (format #f "\\repeat ~a ~a ~a ~a" repeat-type (ly:music-property expr 'repeat-count) @@ -697,7 +697,7 @@ Otherwise, return #f." "" (format #f "\\alternative { ~{~a ~}}" (map-in-order (lambda (music) - (music->lily-string music parser)) + (music->lily-string music)) alternatives))))))) (define-display-method VoltaRepeatedMusic (expr parser) @@ -742,7 +742,7 @@ Otherwise, return #f." operations)) (*indent*))) (parameterize ((*current-context* ctype)) - (music->lily-string music parser))))) + (music->lily-string music))))) ;; special cases: \figures \lyrics \drums (define-extra-display-method ContextSpeccedMusic (expr parser) @@ -755,11 +755,11 @@ Otherwise, return #f." (parameterize ((*explicit-mode* #f)) (case ?context-type ((FiguredBass) - (format #f "\\figures ~a" (music->lily-string ?sequence parser))) + (format #f "\\figures ~a" (music->lily-string ?sequence))) ((Lyrics) - (format #f "\\lyrics ~a" (music->lily-string ?sequence parser))) + (format #f "\\lyrics ~a" (music->lily-string ?sequence))) ((DrumStaff) - (format #f "\\drums ~a" (music->lily-string ?sequence parser))) + (format #f "\\drums ~a" (music->lily-string ?sequence))) (else #f))) #f))) @@ -778,12 +778,12 @@ Otherwise, return #f." (and (sequence? element) (every property-tuning? (ly:music-property element 'elements))))) (parameterize ((*current-context* (ly:music-property expr 'context-type))) - (music->lily-string element parser)) + (music->lily-string element)) #f))) -(define-public (value->lily-string arg parser) +(define-public (value->lily-string arg) (cond ((ly:music? arg) - (music->lily-string arg parser)) + (music->lily-string arg)) ((string? arg) (format #f "#~s" arg)) ((markup? arg) @@ -792,7 +792,7 @@ Otherwise, return #f." (format #f "##{ ~a #}" (duration->lily-string arg #:force-duration #t))) ((ly:pitch? arg) (format #f "~a~a" - (note-name->lily-string arg parser) + (note-name->lily-string arg) (octave->lily-string arg))) (else (format #f "#~a" (scheme-expr->lily-string arg))))) @@ -809,7 +809,7 @@ Otherwise, return #f." "" (format #f "~a . " (*current-context*))) property - (value->lily-string value parser) + (value->lily-string value) (new-line->lily-string)))) (define-display-method PropertyUnset (expr parser) @@ -837,7 +837,7 @@ Otherwise, return #f." (if (eqv? (*current-context*) 'Bottom) (cons symbol properties) (cons* (*current-context*) symbol properties)) - (value->lily-string value parser) + (value->lily-string value) (new-line->lily-string)))) (define-display-method RevertProperty (expr parser) @@ -1008,7 +1008,7 @@ Otherwise, return #f." (define-display-method PartCombineMusic (expr parser) (format #f "\\partcombine ~{~a ~}" (map-in-order (lambda (music) - (music->lily-string music parser)) + (music->lily-string music)) (ly:music-property expr 'elements)))) (define-extra-display-method PartCombineMusic (expr parser) @@ -1028,9 +1028,9 @@ Otherwise, return #f." (cond ((equal? ?dir UP) "Up") ((equal? ?dir DOWN) "Down") (else "")) - (music->lily-string ?sequence1 parser) + (music->lily-string ?sequence1) (new-line->lily-string) - (music->lily-string ?sequence2 parser)))) + (music->lily-string ?sequence2)))) (define-extra-display-method ContextSpeccedMusic (expr parser) "If `expr' is a \\partcombine expression, return \"\\partcombine ...\". @@ -1057,10 +1057,10 @@ Otherwise, return #f." ?pc-music)))) (with-music-match (?pc-music (music 'PartCombineMusic)) - (format #f "~a" (music->lily-string ?pc-music parser))))) + (format #f "~a" (music->lily-string ?pc-music))))) (define-display-method UnrelativableMusic (expr parser) - (music->lily-string (ly:music-property expr 'element) parser)) + (music->lily-string (ly:music-property expr 'element))) ;;; Cue notes (define-display-method QuoteMusic (expr parser) @@ -1074,10 +1074,10 @@ Otherwise, return #f." (format #f "\\cueDuring #~s #~a ~a" ?quoted-music-name ?quoted-voice-direction - (music->lily-string ?music parser))) + (music->lily-string ?music))) (format #f "\\quoteDuring #~s ~a" (ly:music-property expr 'quoted-music-name) - (music->lily-string (ly:music-property expr 'element) parser)))) + (music->lily-string (ly:music-property expr 'element))))) ;;; ;;; Breaks @@ -1125,7 +1125,7 @@ Otherwise, return #f." (ly:music-property expr 'associated-context) (parameterize ((*explicit-mode* #f) (*omit-duration* #t)) - (music->lily-string (ly:music-property expr 'element) parser)))) + (music->lily-string (ly:music-property expr 'element))))) ;; \addlyrics (define-extra-display-method SimultaneousMusic (expr parser) @@ -1142,11 +1142,11 @@ Otherwise, return #f." element ?lyric-sequence))))) (if (string=? ?id ?associated-id) (format #f "~a~a \\addlyrics ~a" - (music->lily-string ?note-sequence parser) + (music->lily-string ?note-sequence) (new-line->lily-string) (parameterize ((*explicit-mode* #f) (*omit-duration* #t)) - (music->lily-string ?lyric-sequence parser))) + (music->lily-string ?lyric-sequence))) #f))) ;; Silence internal event sent at end of each lyrics block diff --git a/scm/define-note-names.scm b/scm/define-note-names.scm index c42fcb8dd0..a2b811f1f2 100644 --- a/scm/define-note-names.scm +++ b/scm/define-note-names.scm @@ -968,7 +968,7 @@ '((espanol español) (italiano français))) -(define-public (note-names-language parser str) +(define-public (note-names-language str) (_ "Select note names language.") (let ((alist (assoc-get (string->symbol str) language-pitch-names @@ -977,5 +977,5 @@ (begin (ly:debug (_ "Using `~a' note names...") str) (set! pitchnames alist) - (ly:parser-set-note-names parser alist)) + (ly:parser-set-note-names alist)) (ly:warning (_ "Could not find language `~a'. Ignoring.") str)))) diff --git a/scm/display-lily.scm b/scm/display-lily.scm index 8d8645b36b..668678146f 100644 --- a/scm/display-lily.scm +++ b/scm/display-lily.scm @@ -99,7 +99,7 @@ display method will be called." (scheme-expr->lily-string val)))) (ly:music-property expr 'tweaks)))) -(define-public (music->lily-string expr parser) +(define-public (music->lily-string expr) "Print @var{expr}, a music expression, in LilyPond syntax." (if (ly:music? expr) (let* ((music-type (ly:music-property expr 'name)) diff --git a/scm/lily-library.scm b/scm/lily-library.scm index b49dfbe0bd..d1a9112765 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -141,27 +141,25 @@ This supports historic use of @code{Completion_heads_engraver} to split ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; parser <-> output hooks. -(define-public (collect-bookpart-for-book parser book-part) +(define-public (collect-bookpart-for-book book-part) "Toplevel book-part handler." (define (add-bookpart book-part) - (ly:parser-define! - parser 'toplevel-bookparts - (cons book-part (ly:parser-lookup parser 'toplevel-bookparts)))) + (ly:parser-define! 'toplevel-bookparts + (cons book-part (ly:parser-lookup 'toplevel-bookparts)))) ;; If toplevel scores have been found before this \bookpart, ;; add them first to a dedicated bookpart - (if (pair? (ly:parser-lookup parser 'toplevel-scores)) + (if (pair? (ly:parser-lookup 'toplevel-scores)) (begin (add-bookpart (ly:make-book-part - (ly:parser-lookup parser 'toplevel-scores))) - (ly:parser-define! parser 'toplevel-scores (list)))) + (ly:parser-lookup 'toplevel-scores))) + (ly:parser-define! 'toplevel-scores (list)))) (add-bookpart book-part)) -(define-public (collect-scores-for-book parser score) - (ly:parser-define! - parser 'toplevel-scores - (cons score (ly:parser-lookup parser 'toplevel-scores)))) +(define-public (collect-scores-for-book score) + (ly:parser-define! 'toplevel-scores + (cons score (ly:parser-lookup 'toplevel-scores)))) -(define-public (collect-music-aux score-handler parser music) +(define-public (collect-music-aux score-handler music) (define (music-property symbol) (ly:music-property music symbol #f)) (cond ((music-property 'page-marker) @@ -182,23 +180,21 @@ This supports historic use of @code{Completion_heads_engraver} to split ((not (music-property 'void)) ;; a regular music expression: make a score with this music ;; void music is discarded - (score-handler (scorify-music music parser))))) + (score-handler (scorify-music music))))) -(define-public (collect-music-for-book parser music) +(define-public (collect-music-for-book music) "Top-level music handler." (collect-music-aux (lambda (score) - (collect-scores-for-book parser score)) - parser + (collect-scores-for-book score)) music)) -(define-public (collect-book-music-for-book parser book music) +(define-public (collect-book-music-for-book book music) "Book music handler." (collect-music-aux (lambda (score) (ly:book-add-score! book score)) - parser music)) -(define-public (scorify-music music parser) +(define-public (scorify-music music) "Preprocess @var{music}." (ly:make-score (fold (lambda (f m) (f m parser)) @@ -208,15 +204,15 @@ This supports historic use of @code{Completion_heads_engraver} to split (define (get-current-filename parser book) "return any suffix value for output filename allowing for settings by calls to bookOutputName function" - (or (paper-variable parser book 'output-filename) - (ly:parser-output-name parser))) + (or (paper-variable book 'output-filename) + (ly:parser-output-name))) (define (get-current-suffix parser book) "return any suffix value for output filename allowing for settings by calls to bookoutput function" - (let ((book-output-suffix (paper-variable parser book 'output-suffix))) + (let ((book-output-suffix (paper-variable book 'output-suffix))) (if (not (string? book-output-suffix)) - (ly:parser-lookup parser 'output-suffix) + (ly:parser-lookup 'output-suffix) book-output-suffix))) (define-public current-outfile-name #f) ; for use by regression tests @@ -229,7 +225,7 @@ bookoutput function" (let* ((base-name (get-current-filename parser book)) (output-suffix (get-current-suffix parser book)) (alist-key (format #f "~a~a" base-name output-suffix)) - (counter-alist (ly:parser-lookup parser 'counter-alist)) + (counter-alist (ly:parser-lookup 'counter-alist)) (output-count (assoc-get alist-key counter-alist 0)) (result base-name)) ;; Allow all ASCII alphanumerics, including accents @@ -246,35 +242,34 @@ bookoutput function" (if (> output-count 0) (set! result (format #f "~a-~a" result output-count))) - (ly:parser-define! - parser 'counter-alist + (ly:parser-define! 'counter-alist (assoc-set! counter-alist alist-key (1+ output-count))) (set! current-outfile-name result) result)) (define (print-book-with parser book process-procedure) - (let* ((paper (ly:parser-lookup parser '$defaultpaper)) - (layout (ly:parser-lookup parser '$defaultlayout)) + (let* ((paper (ly:parser-lookup '$defaultpaper)) + (layout (ly:parser-lookup '$defaultlayout)) (outfile-name (get-outfile-name parser book))) (process-procedure book paper layout outfile-name))) -(define-public (print-book-with-defaults parser book) +(define-public (print-book-with-defaults book) (print-book-with parser book ly:book-process)) -(define-public (print-book-with-defaults-as-systems parser book) +(define-public (print-book-with-defaults-as-systems book) (print-book-with parser book ly:book-process-to-systems)) ;; Add a score to the current bookpart, book or toplevel -(define-public (add-score parser score) +(define-public (add-score score) (cond - ((ly:parser-lookup parser '$current-bookpart) - ((ly:parser-lookup parser 'bookpart-score-handler) - (ly:parser-lookup parser '$current-bookpart) score)) - ((ly:parser-lookup parser '$current-book) - ((ly:parser-lookup parser 'book-score-handler) - (ly:parser-lookup parser '$current-book) score)) + ((ly:parser-lookup '$current-bookpart) + ((ly:parser-lookup 'bookpart-score-handler) + (ly:parser-lookup '$current-bookpart) score)) + ((ly:parser-lookup '$current-book) + ((ly:parser-lookup 'book-score-handler) + (ly:parser-lookup '$current-book) score)) (else - ((ly:parser-lookup parser 'toplevel-score-handler) parser score)))) + ((ly:parser-lookup 'toplevel-score-handler) parser score)))) (define-public paper-variable (let @@ -283,8 +278,8 @@ bookoutput function" (append (if (and book (ly:output-def? (ly:book-paper book))) (list (ly:book-paper book)) '()) - (ly:parser-lookup parser '$papers) - (list (ly:parser-lookup parser '$defaultpaper)))))) + (ly:parser-lookup '$papers) + (list (ly:parser-lookup '$defaultpaper)))))) (make-procedure-with-setter (lambda (parser book symbol) (any (lambda (p) (ly:output-def-lookup p symbol #f)) @@ -294,16 +289,15 @@ bookoutput function" (car (get-papers parser book)) symbol value))))) -(define-public (add-text parser text) - (add-score parser (list text))) +(define-public (add-text text) + (add-score (list text))) -(define-public (add-music parser music) +(define-public (add-music music) (collect-music-aux (lambda (score) - (add-score parser score)) - parser + (add-score score)) music)) -(define-public (context-mod-from-music parser music) +(define-public (context-mod-from-music music) (let ((warn #t) (mods (ly:make-context-mod))) (let loop ((m music)) (if (music-is-of-type? m 'layout-instruction-event) @@ -351,7 +345,7 @@ bookoutput function" (set! warn #f))))))))) mods)) -(define-public (context-defs-from-music parser output-def music) +(define-public (context-defs-from-music output-def music) (let ((warn #t)) (let loop ((m music) (mods #f)) ;; The parser turns all sets, overrides etc into something diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index eb323b8a00..a645b085da 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -44,10 +44,10 @@ (define (music-function-call-error loc fun m) (let* ((sig (ly:music-function-signature fun)) (pred (if (pair? (car sig)) (caar sig) (car sig)))) - (ly:parser-error (*parser*) + (ly:parser-error (format #f (_ "~a function cannot return ~a") (type-name pred) - (value->lily-string m (*parser*))) + (value->lily-string m)) loc) (and (pair? (car sig)) (cdar sig)))) @@ -76,7 +76,6 @@ (define-ly-syntax (argument-error location n pred arg) (ly:parser-error - (*parser*) (format #f (_ "wrong type for argument ~a. Expecting ~a, found ~s") n (type-name pred) (music->make-music arg)) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 2c44e33cb2..176f08efcf 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -229,13 +229,13 @@ which often can be read back in order to generate an equivalent expression." (use-modules (srfi srfi-39) (scm display-lily)) -(define*-public (display-lily-music expr parser #:optional (port (current-output-port)) +(define*-public (display-lily-music expr #:optional (port (current-output-port)) #:key force-duration) "Display the music expression using LilyPond syntax" (memoize-clef-names supported-clefs) (parameterize ((*indent* 0) (*omit-duration* #f)) - (display (music->lily-string expr parser) port) + (display (music->lily-string expr) port) (newline port))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -406,7 +406,7 @@ beats to be distinguished." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; property setting music objs. -(define-safe-public (check-grob-path path #:optional parser location +(define-safe-public (check-grob-path path #:optional location #:key (start 0) default @@ -476,7 +476,7 @@ respectively." res (begin (if parser - (ly:parser-error parser + (ly:parser-error (format #f (_ "bad grob property path ~a") path) location)) @@ -1300,8 +1300,8 @@ then revert skipTypesetting." the 'length property of the music is overridden to speed up compiling." (let* - ((show-last (ly:parser-lookup parser 'showLastLength)) - (show-first (ly:parser-lookup parser 'showFirstLength)) + ((show-last (ly:parser-lookup 'showLastLength)) + (show-first (ly:parser-lookup 'showFirstLength)) (show-last-length (and (ly:music? show-last) (ly:music-length show-last))) (show-first-length (and (ly:music? show-first) @@ -1353,7 +1353,7 @@ then revert skipTypesetting." (list (lambda (music parser) (expand-repeat-chords! (cons 'rhythmic-event - (ly:parser-lookup parser '$chord-repeat-events)) + (ly:parser-lookup '$chord-repeat-events)) music)) (lambda (music parser) (expand-repeat-notes! music)) (lambda (music parser) (voicify-music music)) @@ -1361,7 +1361,7 @@ then revert skipTypesetting." (lambda (x parser) (music-map precompute-music-length x)) (lambda (music parser) - (music-map (quote-substitute (ly:parser-lookup parser 'musicQuotes)) music)) + (music-map (quote-substitute (ly:parser-lookup 'musicQuotes)) music)) ;; switch-on-debugging (lambda (x parser) (music-map cue-substitute x)) @@ -1984,7 +1984,7 @@ recursing into matches themselves." (any (lambda (t) (music-is-of-type? m t)) type)) (lambda (m) (music-is-of-type? m type))))) -(define*-public (event-chord-wrap! music #:optional parser) +(define*-public (event-chord-wrap! music #:optional) "Wrap isolated rhythmic events and non-postevent events in @var{music} inside of an @code{EventChord}. If the optional @var{parser} argument is given, chord repeats @samp{q} are expanded @@ -2009,7 +2009,7 @@ yourself." (if parser (expand-repeat-chords! (cons 'rhythmic-event - (ly:parser-lookup parser '$chord-repeat-events)) + (ly:parser-lookup '$chord-repeat-events)) music) music))) diff --git a/scm/paper.scm b/scm/paper.scm index c488db1ac9..55932e46eb 100644 --- a/scm/paper.scm +++ b/scm/paper.scm @@ -107,7 +107,7 @@ "Set the default staff size, where SZ is thought to be in PT." (let* ((current-mod (current-module)) (parser (eval 'parser current-mod)) - (pap (ly:parser-lookup parser '$defaultpaper)) + (pap (ly:parser-lookup '$defaultpaper)) (in-layout? (or (module-defined? current-mod 'is-paper) (module-defined? current-mod 'is-layout))) diff --git a/scm/parser-ly-from-scheme.scm b/scm/parser-ly-from-scheme.scm index 7322d9bb16..37bc4fcbc6 100644 --- a/scm/parser-ly-from-scheme.scm +++ b/scm/parser-ly-from-scheme.scm @@ -67,11 +67,11 @@ from @var{port} and return the corresponding Scheme music expression. closures))))))))))) (define (embedded-lilypond parser lily-string filename line closures location) - (let* ((clone (ly:parser-clone parser closures location)) + (let* ((clone (ly:parser-clone closures location)) (result (ly:parse-string-expression clone lily-string filename line))) (if (ly:parser-has-error? clone) - (ly:parser-error parser (_ "error in #{ ... #}"))) + (ly:parser-error (_ "error in #{ ... #}"))) result)) (list embedded-lilypond (list *parser*) lily-string filename line diff --git a/scm/part-combiner.scm b/scm/part-combiner.scm index 20b7b05cc5..b8661afe2b 100644 --- a/scm/part-combiner.scm +++ b/scm/part-combiner.scm @@ -299,11 +299,11 @@ LilyPond version 2.8 and earlier." global) context-list)) -(define-public (make-part-combine-music parser music-list direction chord-range) +(define-public (make-part-combine-music music-list direction chord-range) (let* ((m (make-music 'PartCombineMusic)) (m1 (make-non-relative-music (context-spec-music (first music-list) 'Voice "one"))) (m2 (make-non-relative-music (context-spec-music (second music-list) 'Voice "two"))) - (listener (ly:parser-lookup parser 'partCombineListener)) + (listener (ly:parser-lookup 'partCombineListener)) (evs2 (recording-group-emulate m2 listener)) (evs1 (recording-group-emulate m1 listener))) @@ -805,13 +805,13 @@ the mark when there are no spanners active. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-public (add-quotable parser name mus) +(define-public (add-quotable name mus) (let* ((tab (eval 'musicQuotes (current-module))) (voicename (get-next-unique-voice-name)) ;; recording-group-emulate returns an assoc list (reversed!), so ;; hand it a proper unique context name and extract that key: (ctx-spec (context-spec-music mus 'Voice voicename)) - (listener (ly:parser-lookup parser 'partCombineListener)) + (listener (ly:parser-lookup 'partCombineListener)) (context-list (reverse (recording-group-emulate ctx-spec listener))) (raw-voice (assoc voicename context-list)) (quote-contents (if (pair? raw-voice) (cdr raw-voice) '())))