From: Jean-Charles Malahieude Date: Sat, 26 Mar 2016 16:13:33 +0000 (+0100) Subject: Merge branch 'master' into translation X-Git-Tag: release/2.19.39-1~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d9b67cc332fa253ab0679b54873b2f17fc37e099;hp=3c7e25104f788861990fbd10b4503462b3368a76;p=lilypond.git Merge branch 'master' into translation --- diff --git a/Documentation/contributor/administration.itexi b/Documentation/contributor/administration.itexi index 510a799d91..dfd5a72fa4 100644 --- a/Documentation/contributor/administration.itexi +++ b/Documentation/contributor/administration.itexi @@ -167,7 +167,8 @@ The Patch Meister's responsibilities are: To keep track of all patches submitted for testing and review. This includes scanning the bug and dev email lists looking for any patches submitted by @q{random} contributors and advising them on how to submit -a patch for testing and review. See @ref{Patches}. +a patch for testing and review. See @ref{Uploading a patch for review} +and @ref{The patch review cycle}. @item To makes sure that any patch submitted has a corresponding Issue Tracker diff --git a/Documentation/contributor/issues.itexi b/Documentation/contributor/issues.itexi index 46587e07dd..782d84d155 100644 --- a/Documentation/contributor/issues.itexi +++ b/Documentation/contributor/issues.itexi @@ -817,7 +817,6 @@ email should contain a link to the issue you just added. @end enumerate - @node Patch handling @section Patch handling @@ -825,221 +824,13 @@ email should contain a link to the issue you just added. separate person handling this task.} For contributors/developers: follow the steps in -@ref{Commits}, @ref{Patches}, and @ref{Pushing to staging}. +@ref{Patches}, and @ref{Pushing to staging}. @ignore For people doing maintenance tasks: git-cl is adding issues, James -is testing them, Colin is selecting them for countdowns, and -Patchy is merging from staging to master. In the coming weeks, -these tasks will be more and more automated. -@end ignore - -@subheading Patch cycle - -@itemize - -@item -Patches get added to the tracker and to Rietveld by the @qq{git-cl} tool, with -a status of @qq{patch-new}. - -@item -The automated tester, Patchy, verifies that the patch can be applied -to current master. By default, it checks that the patch allows @code{make} -and @code{make test} to complete successfully. It can also be configured to -check that @code{make doc} is successful. If it passes, Patchy changes the -status to @qq{patch-review} and emails the developer list. If the patch -fails, Patchy sets it to @qq{patch-needs_work} and notifies the developer list. - -@item -The Patch Meister reviews the tracker periodically, to list patches -which have been on review for at least 24 hours. The list is found at - -@smallexample -@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:patch%20patch=review&sort=modified+patch&colspec=ID%20Type%20Status%20Priority%20Owner%20Patch%20Summary%20Modified} -@end smallexample - -@item -For each patch, the Handler reviews any discussion on the tracker -and on Rietveld, to determine whether the patch can go forward. If -there is any indication that a developer thinks the patch is not -ready, the Handler marks it @qq{patch-needs_work} and makes a comment -regarding the reason, referring to the Rietveld item if needed. - -@item -Patches with explicit approval, or at least no negative comment, can -be updated to @qq{patch-countdown}. When saving the tracker item, -clear the @qq{send email} box to prevent sending notification for -each patch. - -@item -The Patch Meister sends an email to the developer list, with a fixed -subject line, to enable filtering by email clients: - -@example -PATCH: Countdown to 20130113 -@end example - -The text of the email sets the deadline for this countdown batch. At -present, batches are done on Tuesday, Thursday and Sunday evenings. - -To create the countdown announcement, use the -@code{make-countdown-announcement.sh} script, which takes the -deadline date, and optionally your name. Follow the instructions -provided: - -@example -cd $LILYPOND_GIT -scripts/auxiliar/make-countdown-announcement.sh "Jan 1, 2001" James -@end example - -The script produces an announcement that is easily readable in all -email clients. Also, whenever a new contributor submits a patch, -you will be prompted to add the new username and author name to -the script itself, and then commit those changes to the main git -repository. - - -@item -On the scheduled countdown day, the Patch Meister reviews the -previous list of patches on countdown, with the same procedure and -criteria as before. Patches with no controversy can be set to -@qq{patch-push} with a courtesy message added to the comment block. - -@item -Roughly at six month intervals, the Patch Meister can list the -patches which have been set to @qq{patch-needs-work} and send the -results to the developer list for review. In most cases, these -patches should be marked @qq{patch-abandoned} but this should come -from the developer if possible. - -@item -As in most organisations of unpaid volunteers, fixed procedures are -useful in as much as they get the job done. In our community, there -is room for senior developers to bypass normal patch handling flows, -particularly now that the testing of patches is largely automated. -Similarly, the minimum age of 24 hours can reasonably be waived if -the patch is minor and from an experienced developer. - - -@end itemize - -@ignore -There is a single Patch Meister, and a number of Patch Helpers -(rename this?). The list of known patches awaiting review is: - -@example -@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:patch&sort=patch} -@end example - - -@subheading Helpers: adding patches - -The primary duty is to add patches to the google tracker; we have -a bad track record of losing patches in email. Patches generally -come to the @code{lilypond-devel} mailing list, but are sometimes -sent to @code{bug-lilypond}, @code{lilypond-users}, or -@code{frogs} mailing list instead. - -@itemize -@item -Unless a patch is clearly in response to an existing issue, add a -new issue with the @code{Patch-new} label and a link to the patch -(either on the mailing list archives or the codereview url). - -Issue numbers are cheap; losing developers because they got fed up -with us losing their hard work is expensive. - -@end ignore -@c if we enter patches immediately, I don't think this is relevant. -@ignore -@item -Before adding a patch-reminder issue, do a quick check to see if -it was pushed without sending any email. This can be checked for -searching for relevant terms (from the patch subject or commit -message) on the webgit page: - -@example -@uref{http://git.savannah.gnu.org/gitweb/?p=lilypond.git} -@end example -@end ignore -@ignore - -@item -If the patch is clearly in response to an existing issue, then -update that issue with the @code{Patch-new} label and a link to -the patch (either on the mailing list archives or the codereview -url). - -@item -After adding the issue, please send a response email to the same -group(s) that the initial patch was sent to. - -If the initial email was sent to multiple mailing lists (such as -both @code{bugs} and @code{devel}), then reply to all those -mailing lists as well. The email should contain a link to the -issue you just added. - -@end itemize - -@subheading Helpers: @code{Patch-review} label - -The secondary duty is to do make sure that every issue in the -tracker with a @code{Patch-review} label has passed these -@qq{obvious} tests: - -@itemize -@item -Applies automatically to git master. - -It's ok to have offsets, but not conflicts. - -@item -Regtest comparison looks ok; no unexpected changes. - -@item -Descriptive subject line. - -Avoid subjects like @qq{fixes 123}; instead write @qq{Doc: discuss -stacking-dir for BassFigureAlignment (fix 123)}. - -@item -Compiles docs from scratch. Only check this if you have reason to -suspect it might not work. - -@item -(maybe) - -Check code indentation and style. This should be easier post-GOP -when we have a better-defined code style. - -@end itemize - - -@subheading Patch Meister - -The Patch Meister will: - -@itemize - -@item -send @qq{countdown} emails to -@code{lilypond-devel} when patches appear to be ready. - -@item -send general requests to review patches, or even nasty requests to -review patches. - -@item -downgrade patches from @code{Patch-review} to -@code{Patch-needs_work} as appropriate. - -@item -downgrade patches from @code{Patch-needs_work} to -@code{Patch-abandoned} if no actions have been taken in four -weeks. - -@end itemize - +is testing patches and managing the Patch countdown. He also generally +runs the scripts that merging to Staging (although other developers are +available to do this task if required). @end ignore diff --git a/Documentation/contributor/source-code.itexi b/Documentation/contributor/source-code.itexi index 7c4dc63778..b43b3f3482 100644 --- a/Documentation/contributor/source-code.itexi +++ b/Documentation/contributor/source-code.itexi @@ -850,6 +850,8 @@ The branches are kept for archival reasons. * Using local branches:: * Commits:: * Patches:: +* Uploading a patch for review:: +* The patch review cycle:: @end menu @@ -1092,10 +1094,9 @@ checked that @code{translation} builds successfully. @node Commits @subsection Commits - @menu * Understanding commits:: -* Making commits:: +* How to make a commit:: * Commit messages:: @end menu @@ -1128,8 +1129,8 @@ branch are available at @uref{http://git.sv.gnu.org/cgit/lilypond.git/log/}. -@node Making commits -@unnumberedsubsubsec Making commits +@node How to make a commit +@unnumberedsubsubsec How to make a commit Once you have modified some source files in your working @@ -1250,15 +1251,13 @@ for examples. @node Patches @subsection Patches - @menu -* Making patches:: -* Uploading a patch for review:: +* How to make a patch:: +* Emailing patches:: @end menu - -@node Making patches -@unnumberedsubsubsec Making patches +@node How to make a patch +@unnumberedsubsubsec How to make a patch If you want to share your changes with other contributors and developers, you need to generate @emph{patches} from your commits. @@ -1298,8 +1297,37 @@ reviewed, the developers may push one or more of them to the main repository or discuss them with you. +@node Emailing patches +@unnumberedsubsubsec Emailing patches + +The default @code{x-diff} MIME type associated with patch files +(i.e., files whose name ends in @code{.patch}) means that the +encoding of line endings may be changed from UNIX to DOS format +when they are sent as attachments. Attempting to apply such an +inadvertently altered patch will cause git to fail with a message +about @q{whitespace errors}. + +The solution to such problems is surprisingly simple---just change +the default file extension of patches generated by git to end in +@code{.txt}, for example: + +@example +git config format.suffix '.patch.txt' +@end example + +This should cause email programs to apply the correct base64 +encoding to attached patches. + +If you receive a patch with DOS instead of UNIX line-endings, it +can be converted back using the @code{dos2unix} utility. + +Lots of useful information on email complications with patches is +provided on the Wine wiki at +@uref{http://wiki.winehq.org/GitWine}. + + @node Uploading a patch for review -@unnumberedsubsubsec Uploading a patch for review +@subsection Uploading a patch for review Any non-trivial change should be uploaded to our @qq{Rietveld} code review website: @@ -1430,7 +1458,9 @@ running: git-cl issue 0 @end example -@subsubheading Wait for a countdown + +@node The patch review cycle +@subsection The patch review cycle Your patch will be available for reviews for the next few hours or days. Three times a week, patches with no known problems are @@ -1447,6 +1477,211 @@ Once a patch has @code{patch-push}, it should be sent to your mentor for uploading. If you have git push ability, look at @ref{Pushing to staging}. +@itemize + +@item +Patches get added to the tracker and to Rietveld by the @qq{git-cl} tool, with +a status of @qq{patch-new}. + +@item +The automated tester, Patchy, verifies that the patch can be applied +to current master. By default, it checks that the patch allows @code{make} +and @code{make test} to complete successfully. It can also be configured to +check that @code{make doc} is successful. If it passes, Patchy changes the +status to @qq{patch-review} and emails the developer list. If the patch +fails, Patchy sets it to @qq{patch-needs_work} and notifies the developer list. + +@item +The Patch Meister reviews the tracker periodically, to list patches +which have been on review for at least 24 hours. The list is found at + +@smallexample +@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:patch%20patch=review&sort=modified+patch&colspec=ID%20Type%20Status%20Priority%20Owner%20Patch%20Summary%20Modified} +@end smallexample + +@item +For each patch, the Handler reviews any discussion on the tracker +and on Rietveld, to determine whether the patch can go forward. If +there is any indication that a developer thinks the patch is not +ready, the Handler marks it @qq{patch-needs_work} and makes a comment +regarding the reason, referring to the Rietveld item if needed. + +@item +Patches with explicit approval, or at least no negative comment, can +be updated to @qq{patch-countdown}. When saving the tracker item, +clear the @qq{send email} box to prevent sending notification for +each patch. + +@item +The Patch Meister sends an email to the developer list, with a fixed +subject line, to enable filtering by email clients: + +@example +PATCH: Countdown to 20130113 +@end example + +The text of the email sets the deadline for this countdown batch. At +present, batches are done on Tuesday, Thursday and Sunday evenings. + +To create the countdown announcement, use the +@code{make-countdown-announcement.sh} script, which takes the +deadline date, and optionally your name. Follow the instructions +provided: + +@example +cd $LILYPOND_GIT +scripts/auxiliar/make-countdown-announcement.sh "Jan 1, 2001" James +@end example + +The script produces an announcement that is easily readable in all +email clients. Also, whenever a new contributor submits a patch, +you will be prompted to add the new username and author name to +the script itself, and then commit those changes to the main git +repository. + + +@item +On the scheduled countdown day, the Patch Meister reviews the +previous list of patches on countdown, with the same procedure and +criteria as before. Patches with no controversy can be set to +@qq{patch-push} with a courtesy message added to the comment block. + +@item +Roughly at six month intervals, the Patch Meister can list the +patches which have been set to @qq{patch-needs-work} and send the +results to the developer list for review. In most cases, these +patches should be marked @qq{patch-abandoned} but this should come +from the developer if possible. + +@item +As in most organisations of unpaid volunteers, fixed procedures are +useful in as much as they get the job done. In our community, there +is room for senior developers to bypass normal patch handling flows, +particularly now that the testing of patches is largely automated. +Similarly, the minimum age of 24 hours can reasonably be waived if +the patch is minor and from an experienced developer. + + +@end itemize + +@ignore +There is a single Patch Meister, and a number of Patch Helpers +(rename this?). The list of known patches awaiting review is: + +@example +@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:patch&sort=patch} +@end example + + +@subheading Helpers: adding patches + +The primary duty is to add patches to the google tracker; we have +a bad track record of losing patches in email. Patches generally +come to the @code{lilypond-devel} mailing list, but are sometimes +sent to @code{bug-lilypond}, @code{lilypond-users}, or +@code{frogs} mailing list instead. + +@itemize +@item +Unless a patch is clearly in response to an existing issue, add a +new issue with the @code{Patch-new} label and a link to the patch +(either on the mailing list archives or the codereview url). + +Issue numbers are cheap; losing developers because they got fed up +with us losing their hard work is expensive. + + +@c if we enter patches immediately, I don't think this is relevant. + +@item +Before adding a patch-reminder issue, do a quick check to see if +it was pushed without sending any email. This can be checked for +searching for relevant terms (from the patch subject or commit +message) on the webgit page: + +@example +@uref{http://git.savannah.gnu.org/gitweb/?p=lilypond.git} +@end example + + +@item +If the patch is clearly in response to an existing issue, then +update that issue with the @code{Patch-new} label and a link to +the patch (either on the mailing list archives or the codereview +url). + +@item +After adding the issue, please send a response email to the same +group(s) that the initial patch was sent to. + +If the initial email was sent to multiple mailing lists (such as +both @code{bugs} and @code{devel}), then reply to all those +mailing lists as well. The email should contain a link to the +issue you just added. + +@end itemize + +@subheading Helpers: @code{Patch-review} label + +The secondary duty is to do make sure that every issue in the +tracker with a @code{Patch-review} label has passed these +@qq{obvious} tests: + +@itemize +@item +Applies automatically to git master. + +It's ok to have offsets, but not conflicts. + +@item +Regtest comparison looks ok; no unexpected changes. + +@item +Descriptive subject line. + +Avoid subjects like @qq{fixes 123}; instead write @qq{Doc: discuss +stacking-dir for BassFigureAlignment (fix 123)}. + +@item +Compiles docs from scratch. Only check this if you have reason to +suspect it might not work. + +@item +(maybe) + +Check code indentation and style. This should be easier post-GOP +when we have a better-defined code style. + +@end itemize + + +@subheading Patch Meister + +The Patch Meister will: + +@itemize + +@item +send @qq{countdown} emails to +@code{lilypond-devel} when patches appear to be ready. + +@item +send general requests to review patches, or even nasty requests to +review patches. + +@item +downgrade patches from @code{Patch-review} to +@code{Patch-needs_work} as appropriate. + +@item +downgrade patches from @code{Patch-needs_work} to +@code{Patch-abandoned} if no actions have been taken in four +weeks. + +@end itemize + +@end ignore + @node Advanced Git procedures @section Advanced Git procedures @@ -1473,7 +1708,6 @@ several Git branches of LilyPond source code is presented. * Working with remote branches:: * Git log:: * Applying remote patches:: -* Sending and receiving patches via email:: * Cleaning up multiple patches:: * Commit access:: * Pushing to staging:: @@ -1727,34 +1961,6 @@ the patch actually @emph{adds}, like a regtest for a fixed bug, would get lost. For the same reason, you should not use the git-independent @samp{patch} program for applying patches. -@node Sending and receiving patches via email -@subsection Sending and receiving patches via email - - -The default @code{x-diff} MIME type associated with patch files -(i.e., files whose name ends in @code{.patch}) means that the -encoding of line endings may be changed from UNIX to DOS format -when they are sent as attachments. Attempting to apply such an -inadvertently altered patch will cause git to fail with a message -about @q{whitespace errors}. - -The solution to such problems is surprisingly simple---just change -the default file extension of patches generated by git to end in -@code{.txt}, for example: - -@example -git config format.suffix '.patch.txt' -@end example - -This should cause email programs to apply the correct base64 -encoding to attached patches. - -If you receive a patch with DOS instead of UNIX line-endings, it -can be converted back using the @code{dos2unix} utility. - -Lots of useful information on email complications with patches is -provided on the Wine wiki at -@uref{http://wiki.winehq.org/GitWine}. @node Cleaning up multiple patches diff --git a/Documentation/extending/scheme-tutorial.itely b/Documentation/extending/scheme-tutorial.itely index f8f23a5fa4..40028ffb66 100644 --- a/Documentation/extending/scheme-tutorial.itely +++ b/Documentation/extending/scheme-tutorial.itely @@ -1504,9 +1504,9 @@ Finally, once we have added the accent articulation to its @code{articulations} property, we can return @code{note-event}, hence the last line of the function. -Now we transform the @code{add-accent} function into a music -function (a matter of some syntactic sugar and a declaration of the type -of its sole @q{real} argument). +Now we transform the @code{add-accent} function into a music function (a +matter of some syntactic sugar and a declaration of the type of its +argument). @example addAccent = #(define-music-function (note-event) @@ -1520,7 +1520,7 @@ addAccent = #(define-music-function (note-event) note-event) @end example -We may verify that this music function works correctly: +We then verify that this music function works correctly: @example \displayMusic \addAccent c4 diff --git a/Documentation/ly-examples/Stockhausen_Klavierstueck2.ly b/Documentation/ly-examples/Stockhausen_Klavierstueck2.ly index 048833cef1..95daf3cc86 100644 --- a/Documentation/ly-examples/Stockhausen_Klavierstueck2.ly +++ b/Documentation/ly-examples/Stockhausen_Klavierstueck2.ly @@ -152,8 +152,8 @@ measIVl = { \new PianoStaff << \new Staff = "upper" { - \override Staff.TimeSignature #'transparent = ##t - \override Staff.TimeSignature #'extra-spacing-width = #'(0.0 . 3.0) + \hide Staff.TimeSignature + \override Staff.TimeSignature.extra-spacing-width = #'(0.0 . 3.0) \accidentalStyle dodecaphonic \autoBeamOff \clef treble @@ -176,7 +176,7 @@ measIVl = { } \new Staff = "lower" { - \override Staff.TimeSignature #'transparent = ##t + \hide Staff.TimeSignature \accidentalStyle dodecaphonic \autoBeamOff \clef bass diff --git a/Documentation/notation/notation-appendices.itely b/Documentation/notation/notation-appendices.itely index 241daf752f..3d8bf79f43 100644 --- a/Documentation/notation/notation-appendices.itely +++ b/Documentation/notation/notation-appendices.itely @@ -204,7 +204,7 @@ Augmented triad, @*minor seventh @tab @code{aug7} @tab -@code{c1:aug} +@code{c1:aug7} @tab @lilypond[line-width=2.1\cm,noragged-right,notime] << @@ -236,7 +236,7 @@ Minor triad, @*major seventh @tab @code{m7+} @tab -@code{m7+} +@code{c1:m7+} @tab @lilypond[line-width=2.1\cm,noragged-right,notime] << diff --git a/Documentation/snippets/arranging-separate-lyrics-on-a-single-line.ly b/Documentation/snippets/arranging-separate-lyrics-on-a-single-line.ly index 9458e21e8b..f3fa10eb30 100644 --- a/Documentation/snippets/arranging-separate-lyrics-on-a-single-line.ly +++ b/Documentation/snippets/arranging-separate-lyrics-on-a-single-line.ly @@ -13,8 +13,7 @@ Sometimes you may want to put lyrics for different performers on a single line: where there is rapidly alternating text, for example. This snippet shows how this can be done with @code{\\override -VerticalAxisGroup #'nonstaff-nonstaff-spacing #'minimum-distance = -##f}. +VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f}. " doctitle = "Arranging separate lyrics on a single line" @@ -23,8 +22,7 @@ VerticalAxisGroup #'nonstaff-nonstaff-spacing #'minimum-distance = \layout { \context { \Lyrics - \override VerticalAxisGroup #'nonstaff-nonstaff-spacing - #'minimum-distance = ##f + \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f } } diff --git a/Documentation/snippets/center-text-below-hairpin-dynamics.ly b/Documentation/snippets/center-text-below-hairpin-dynamics.ly index 1791b38b79..40810e6a19 100644 --- a/Documentation/snippets/center-text-below-hairpin-dynamics.ly +++ b/Documentation/snippets/center-text-below-hairpin-dynamics.ly @@ -41,10 +41,8 @@ hairpinWithCenteredText = (ly:grob-layout grob) 'staff-space)) (staff-line-thickness (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness)) - (grob-name (lambda (x) (assq-ref - (ly:grob-property x 'meta) 'name))) (par-x (ly:grob-parent grob X)) - (dyn-text (eq? (grob-name par-x) 'DynamicText )) + (dyn-text (grob::has-interface par-x 'dynamic-text-interface)) (dyn-text-stencil-x-length (if dyn-text (interval-length diff --git a/Documentation/snippets/centering-markup-on-note-heads-automatically.ly b/Documentation/snippets/centering-markup-on-note-heads-automatically.ly deleted file mode 100644 index 6b48240774..0000000000 --- a/Documentation/snippets/centering-markup-on-note-heads-automatically.ly +++ /dev/null @@ -1,67 +0,0 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" - -\header { - lsrtags = "contexts-and-engravers, text, tweaks-and-overrides" - - texidoc = " -For technical reasons, text scripts attached to note heads cannot -easily be centered on a note head's width, unlike articulations. - -Instead of using trial-and-error offset tweaks, this snippet uses a -Scheme engraver to reset the horizontal parent of each markup to a -@code{NoteColumn}. This also allows text to follow note heads which -have been shifted via @code{force-hshift}. - - - -" - doctitle = "Centering markup on note heads automatically" -} % begin verbatim - -#(define (Text_align_engraver ctx) - (let ((scripts '()) - (note-column #f)) - (make-engraver - (acknowledgers - ((note-column-interface trans grob source) - ;; cache NoteColumn in this Voice context - (set! note-column grob)) - ((text-script-interface trans grob source) - ;; whenever a TextScript is acknowledged, - ;; add it to `scripts' list - (set! scripts (cons grob scripts)))) - ((stop-translation-timestep trans) - ;; if any TextScript grobs exist, - ;; set NoteColumn as X-parent - (for-each (lambda (script) - (set! (ly:grob-parent script X) note-column)) - scripts) - ;; clear scripts ready for next timestep - (set! scripts '()))))) - -\layout { - \context { - \Voice - \consists #Text_align_engraver - \override TextScript.X-offset = - #ly:self-alignment-interface::aligned-on-x-parent - \override TextScript.self-alignment-X = #CENTER - } -} - -\new Staff << - \relative c'' { - \override NoteColumn.force-hshift = #3 - c1-\markup { \arrow-head #Y #DOWN ##t } - } - \\ - \relative c' { - a4 a-\markup { \huge ^ } a a - } ->> diff --git a/Documentation/snippets/changing-stanza-fonts.ly b/Documentation/snippets/changing-stanza-fonts.ly index cc468d72ce..dcbd1f99d3 100644 --- a/Documentation/snippets/changing-stanza-fonts.ly +++ b/Documentation/snippets/changing-stanza-fonts.ly @@ -1,10 +1,9 @@ -% DO NOT EDIT this file manually; it is automatically -% generated from Documentation/snippets/new -% Make any changes in Documentation/snippets/new/ -% and then run scripts/auxiliar/makelsr.py -% -% This file is in the public domain. -%% Note: this file works from version 2.18.0 +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. \version "2.18.0" \header { @@ -18,8 +17,7 @@ used for printing the stanza number. doctitle = "Changing stanza fonts" } % begin verbatim - -\new Voice { +\relative c'' { \time 3/4 g2 e4 a2 f4 diff --git a/Documentation/snippets/changing-the-default-text-font-family.ly b/Documentation/snippets/changing-the-default-text-font-family.ly index 99e80cd7e2..0b0097158b 100644 --- a/Documentation/snippets/changing-the-default-text-font-family.ly +++ b/Documentation/snippets/changing-the-default-text-font-family.ly @@ -1,10 +1,9 @@ -% DO NOT EDIT this file manually; it is automatically -% generated from Documentation/snippets/new -% Make any changes in Documentation/snippets/new/ -% and then run scripts/auxiliar/makelsr.py -% -% This file is in the public domain. -%% Note: this file works from version 2.18.0 +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. \version "2.18.0" \header { @@ -18,7 +17,6 @@ The default font families for text can be overridden with doctitle = "Changing the default text font family" } % begin verbatim - \paper { % change for other default global staff size. myStaffSize = #20 diff --git a/Documentation/snippets/contexts-and-engravers.snippet-list b/Documentation/snippets/contexts-and-engravers.snippet-list index 66b3139c7a..3b3c016eb3 100644 --- a/Documentation/snippets/contexts-and-engravers.snippet-list +++ b/Documentation/snippets/contexts-and-engravers.snippet-list @@ -3,7 +3,6 @@ adding-an-extra-staff-at-a-line-break.ly adding-an-extra-staff.ly automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly centered-measure-numbers.ly -centering-markup-on-note-heads-automatically.ly changing-midi-output-to-one-channel-per-voice.ly changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly chant-or-psalms-notation.ly diff --git a/Documentation/snippets/displaying-complex-chords.ly b/Documentation/snippets/displaying-complex-chords.ly index a433eb96d0..b90be17083 100644 --- a/Documentation/snippets/displaying-complex-chords.ly +++ b/Documentation/snippets/displaying-complex-chords.ly @@ -30,6 +30,7 @@ fixB = { \once \override Accidental.extra-offset = #'(4 . -.1) } + \relative c' { << { \fixA 8 } \\ { \voiceThree \fixB dis } >> s } diff --git a/Documentation/snippets/displaying-grob-ancestry.ly b/Documentation/snippets/displaying-grob-ancestry.ly index 7a75bb1a33..dc55c346f2 100644 --- a/Documentation/snippets/displaying-grob-ancestry.ly +++ b/Documentation/snippets/displaying-grob-ancestry.ly @@ -11,19 +11,23 @@ texidoc = " When working with grob callbacks, it can be helpful to understand a -grob's @qq{ancestry}. Most grobs have @qq{parents} which influence the +grob’s ancestry. Most grobs have parents which influence the positioning of the grob. X- and Y-parents influence the horizontal and vertical positions for the grob, respectively. Additionally, each parent may have parents of its own. -Unfortunately, there are several aspects of a grob's ancestry that can +Unfortunately, there are several aspects of a grob’s ancestry that can lead to confusion: -* The types of parents a grob has may depend on context. * For some -grobs, the X- and Y-parents are the same. * A particular @qq{ancestor} -may be related to a grob in multiple ways. * The concept of -@qq{generations} is misleading. + +* The types of parents a grob has may depend on context. + +* For some grobs, the X- and Y-parents are the same. + +* A particular “ancestor” may be related to a grob in multiple ways. + +* The concept of “generations” is misleading. For example, the @code{System} grob can be both parent (on the Y-side) @@ -31,35 +35,27 @@ and grandparent (twice on the X-side) to a @code{VerticalAlignment} grob. -This macro prints (to the console) a textual representation of a grob's +This macro prints (to the console) a textual representation of a grob’s ancestry. +When called this way: -When called this way - - -@{ - \\once \\override NoteHead #'before-line-breaking = #display-ancestry - c @} - +@code{@{ \\once \\override NoteHead.before-line-breaking = +#display-ancestry c @}} The following output is generated: ------------------------------------- - -NoteHead X,Y: NoteColumn - X: PaperColumn - X,Y: System - Y: VerticalAxisGroup - X: NonMusicalPaperColumn - X,Y: System - Y: VerticalAlignment - X: NonMusicalPaperColumn - X,Y: System - Y: System - - +@code{NoteHead X,Y: NoteColumn + X: PaperColumn + X,Y: System + Y: VerticalAxisGroup + X: NonMusicalPaperColumn + X,Y: System + Y: VerticalAlignment + X: NonMusicalPaperColumn + X,Y: System + Y: System} " doctitle = "Displaying grob ancestry" @@ -68,17 +64,17 @@ NoteHead X,Y: NoteColumn %% http://lsr.di.unimi.it/LSR/Item?id=622 %% see also http://www.lilypond.org/doc/v2.18/Documentation/snippets/tweaks-and-overrides#tweaks-and-overrides-displaying-grob-ancestry -#(define (grob-name grob) - (if (ly:grob? grob) - (assoc-ref (ly:grob-property grob 'meta) 'name) - #f)) +%% Remark: +%% grob::name is in the source since 2.19.x could be deleted during next LSR-upgrade +#(define (grob::name grob) + (assq-ref (ly:grob-property grob 'meta) 'name)) #(define (get-ancestry grob) - (if (not (null? (ly:grob-parent grob X))) - (list (grob-name grob) - (get-ancestry (ly:grob-parent grob X)) - (get-ancestry (ly:grob-parent grob Y))) - (grob-name grob))) + (if (not (null? (ly:grob-parent grob X))) + (list (grob::name grob) + (get-ancestry (ly:grob-parent grob X)) + (get-ancestry (ly:grob-parent grob Y))) + (grob::name grob))) #(define (format-ancestry lst padding) (string-append @@ -114,7 +110,9 @@ NoteHead X,Y: NoteColumn (format (current-error-port) "~3&~a~2%~a~&" (make-string 36 #\-) - (format-ancestry (get-ancestry grob) 0))) + (if (ly:grob? grob) + (format-ancestry (get-ancestry grob) 0) + (format #f "~a is not a grob" grob)))) \relative c' { \once \override NoteHead.before-line-breaking = #display-ancestry diff --git a/Documentation/snippets/how-to-change-fret-diagram-position.ly b/Documentation/snippets/how-to-change-fret-diagram-position.ly index 725be2d462..e1b3dd9b74 100644 --- a/Documentation/snippets/how-to-change-fret-diagram-position.ly +++ b/Documentation/snippets/how-to-change-fret-diagram-position.ly @@ -1,11 +1,10 @@ -% DO NOT EDIT this file manually; it is automatically -% generated from Documentation/snippets/new -% Make any changes in Documentation/snippets/new/ -% and then run scripts/auxiliar/makelsr.py -% -% This file is in the public domain. -%% Note: this file works from version 2.19.22 -\version "2.19.22" +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. +\version "2.18.0" \header { lsrtags = "fretted-strings, specific-notation, tweaks-and-overrides" diff --git a/Documentation/snippets/modifying-the-ottava-spanner-slope.ly b/Documentation/snippets/modifying-the-ottava-spanner-slope.ly index dea97c455e..3010e3107c 100644 --- a/Documentation/snippets/modifying-the-ottava-spanner-slope.ly +++ b/Documentation/snippets/modifying-the-ottava-spanner-slope.ly @@ -1,14 +1,13 @@ -% DO NOT EDIT this file manually; it is automatically -% generated from Documentation/snippets/new -% Make any changes in Documentation/snippets/new/ -% and then run scripts/auxiliar/makelsr.py -% -% This file is in the public domain. -%% Note: this file works from version 2.18.0 +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. \version "2.18.0" \header { - lsrtags = "tweaks-and-overrides, pitches, staff-notation" + lsrtags = "pitches, staff-notation, tweaks-and-overrides" texidoc = " It is possible to change the slope of the Ottava spanner. @@ -17,7 +16,6 @@ It is possible to change the slope of the Ottava spanner. doctitle = "Modifying the Ottava spanner slope" } % begin verbatim - \relative c'' { \override Staff.OttavaBracket.stencil = #ly:line-spanner::print \override Staff.OttavaBracket.bound-details = diff --git a/Documentation/snippets/new/changing-stanza-fonts.ly b/Documentation/snippets/new/changing-stanza-fonts.ly deleted file mode 100644 index 65f54fed92..0000000000 --- a/Documentation/snippets/new/changing-stanza-fonts.ly +++ /dev/null @@ -1,29 +0,0 @@ -\version "2.18.0" - -\header { - lsrtags = "really-simple, vocal-music" - - texidoc = " -Fonts can be changed independently for each stanza, including the font -used for printing the stanza number. - -" - doctitle = "Changing stanza fonts" -} - -\new Voice { - \time 3/4 - g2 e4 - a2 f4 - g2. -} -\addlyrics { - \set stanza = #"1. " - Hi, my name is Bert. -} -\addlyrics { - \override StanzaNumber.font-name = #"DejaVu Sans" - \set stanza = #"2. " - \override LyricText.font-family = #'typewriter - Oh, ché -- ri, je t'aime -} diff --git a/Documentation/snippets/new/changing-the-default-text-font-family.ly b/Documentation/snippets/new/changing-the-default-text-font-family.ly deleted file mode 100644 index 7db90d3d19..0000000000 --- a/Documentation/snippets/new/changing-the-default-text-font-family.ly +++ /dev/null @@ -1,48 +0,0 @@ -\version "2.18.0" - -\header { - lsrtags = "text, tweaks-and-overrides" - - texidoc = " -The default font families for text can be overridden with -@code{make-pango-font-tree}. - -" - doctitle = "Changing the default text font family" -} - -\paper { - % change for other default global staff size. - myStaffSize = #20 - %{ - run - lilypond -dshow-available-fonts blabla - to show all fonts available in the process log. - %} - - #(define fonts - (make-pango-font-tree "Times New Roman" - "Nimbus Sans,Nimbus Sans L" - "Luxi Mono" -;; "Helvetica" -;; "Courier" - (/ myStaffSize 20))) -} - -\relative c'' { - c4^\markup { - roman: foo \bold bla \italic bar \italic \bold baz - } - c'4_\markup { - \override #'(font-family . sans) - { - sans: foo \bold bla \italic bar \italic \bold baz - } - } - c'2^\markup { - \override #'(font-family . typewriter) - { - mono: foo \bold bla \italic bar \italic \bold baz - } - } -} diff --git a/Documentation/snippets/new/how-to-change-fret-diagram-position.ly b/Documentation/snippets/new/how-to-change-fret-diagram-position.ly deleted file mode 100644 index 39cf3cf470..0000000000 --- a/Documentation/snippets/new/how-to-change-fret-diagram-position.ly +++ /dev/null @@ -1,52 +0,0 @@ -\version "2.19.22" - -\header { - lsrtags = "fretted-strings, specific-notation, tweaks-and-overrides" - - texidoc = " -If you want to move the position of a fret diagram, for example, to -avoid collision, or to place it between two notes, you have various -possibilities: - -1) modify #'padding or #'extra-offset values (as shown in the first -snippet) - -2) you can add an invisible voice and attach the fret diagrams to the -invisible notes in that voice (as shown in the second example). - - If you need to move the fret according with a rythmic position inside -the bar (in the example, the third beat of the measure) the second -example is better, because the fret is aligned with the third beat -itself. - -" - doctitle = "How to change fret diagram position" -} -harmonies = \chordmode -{ - a8:13 -% THE FOLLOWING IS THE COMMAND TO MOVE THE CHORD NAME - \once \override ChordNames.ChordName.extra-offset = #'(10 . 0) - b8:13 s2. -% THIS LINE IS THE SECOND METHOD - s4 s4 b4:13 -} - -\score -{ - << - \new ChordNames \harmonies - \new Staff - {a8^\markup { \fret-diagram #"6-x;5-0;4-2;3-0;2-0;1-2;" } -% THE FOLLOWING IS THE COMMAND TO MOVE THE FRET DIAGRAM - \once \override TextScript.extra-offset = #'(10 . 0) - b4.~^\markup { \fret-diagram #"6-x;5-2;4-4;3-2;2-2;1-4;" } b4. a8\break -% HERE IS THE SECOND METHOD - << - { a8 b4.~ b4. a8} - { s4 s4 s4^\markup { \fret-diagram #"6-x;5-2;4-4;3-2;2-2;1-4;" } - } - >> - } - >> -} diff --git a/Documentation/snippets/new/modifying-the-ottava-spanner-slope.ly b/Documentation/snippets/new/modifying-the-ottava-spanner-slope.ly deleted file mode 100644 index bc9e4a48b5..0000000000 --- a/Documentation/snippets/new/modifying-the-ottava-spanner-slope.ly +++ /dev/null @@ -1,31 +0,0 @@ -\version "2.18.0" - -\header { - lsrtags = "tweaks-and-overrides, pitches, staff-notation" - - texidoc = " -It is possible to change the slope of the Ottava spanner. - -" - doctitle = "Modifying the Ottava spanner slope" -} - -\relative c'' { - \override Staff.OttavaBracket.stencil = #ly:line-spanner::print - \override Staff.OttavaBracket.bound-details = - #`((left . ((Y . 0) ; Change the integer here - (attach-dir . ,LEFT) - (padding . 0) - (stencil-align-dir-y . ,CENTER))) - (right . ((Y . 5) ; Change the integer here - (padding . 0) - (attach-dir . ,RIGHT) - (text . ,(make-draw-dashed-line-markup (cons 0 -1.2)))))) - \override Staff.OttavaBracket.left-bound-info = - #ly:line-spanner::calc-left-bound-info-and-text - \override Staff.OttavaBracket.right-bound-info = - #ly:line-spanner::calc-right-bound-info - \ottava #1 - c1 - c'''1 -} diff --git a/Documentation/snippets/new/staff-headword.ly b/Documentation/snippets/new/staff-headword.ly index a23b5cb063..4c7aff1f02 100644 --- a/Documentation/snippets/new/staff-headword.ly +++ b/Documentation/snippets/new/staff-headword.ly @@ -1,4 +1,4 @@ -\version "2.17.6" +\version "2.19.0" \include "catalan.ly" \header { diff --git a/Documentation/snippets/pitches-headword.ly b/Documentation/snippets/pitches-headword.ly index b2f27eddc9..16859e9431 100644 --- a/Documentation/snippets/pitches-headword.ly +++ b/Documentation/snippets/pitches-headword.ly @@ -75,7 +75,7 @@ Piches headword 2 e'2 | - 2 -\tweak #'style #'none \cresc + 2 -\tweak style #'none \cresc b'4 4 | diff --git a/Documentation/snippets/score-for-diatonic-accordion.ly b/Documentation/snippets/score-for-diatonic-accordion.ly index 9419a6893e..fddf7c230b 100644 --- a/Documentation/snippets/score-for-diatonic-accordion.ly +++ b/Documentation/snippets/score-for-diatonic-accordion.ly @@ -81,7 +81,7 @@ staffTabLine = \new Staff \with { \key c \major \relative c'' { - % disable the following line to see the noteheads while writing the song + % disable the following line to see the the noteheads while writing the song \NoNoteHead \override NoteHead.no-ledgers = ##t diff --git a/Documentation/snippets/staff-headword.ly b/Documentation/snippets/staff-headword.ly index 952b5d833f..056cfca008 100644 --- a/Documentation/snippets/staff-headword.ly +++ b/Documentation/snippets/staff-headword.ly @@ -4,8 +4,8 @@ % and then run scripts/auxiliar/makelsr.py % % This file is in the public domain. -%% Note: this file works from version 2.17.6 -\version "2.17.6" +%% Note: this file works from version 2.19.0 +\version "2.19.0" \include "catalan.ly" \header { diff --git a/Documentation/snippets/text.snippet-list b/Documentation/snippets/text.snippet-list index 380f092674..e87e87ed25 100644 --- a/Documentation/snippets/text.snippet-list +++ b/Documentation/snippets/text.snippet-list @@ -6,7 +6,6 @@ aligning-objects-created-with-the--mark-command.ly aligning-syllables-with-melisma.ly blanking-staff-lines-using-the--whiteout-command.ly center-text-below-hairpin-dynamics.ly -centering-markup-on-note-heads-automatically.ly changing-ottava-text.ly changing-the-default-text-font-family.ly combining-dynamics-with-markup-texts.ly diff --git a/Documentation/snippets/tweaks-and-overrides.snippet-list b/Documentation/snippets/tweaks-and-overrides.snippet-list index 71a02386c7..ed848f2c0a 100644 --- a/Documentation/snippets/tweaks-and-overrides.snippet-list +++ b/Documentation/snippets/tweaks-and-overrides.snippet-list @@ -10,7 +10,6 @@ analysis-brackets-above-the-staff.ly asymmetric-slurs.ly avoiding-collisions-with-chord-fingerings.ly caesura-railtracks-with-fermata.ly -centering-markup-on-note-heads-automatically.ly changing-a-single-notes-size-in-a-chord.ly changing-beam-thickness-and-spacing.ly changing-form-of-multi-measure-rests.ly diff --git a/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly b/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly index 199db158e1..086b1b6d98 100644 --- a/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly +++ b/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly @@ -34,8 +34,8 @@ menrest = #(define-music-function (note) MensStyle = { \autoBeamOff - \override NoteHead #'style = #'petrucci - \override Score.BarNumber #'transparent = ##t + \override NoteHead.style = #'petrucci + \override Score.BarNumber.transparent = ##t \override Stem.neutral-direction = #up } diff --git a/Documentation/web/news-front.itexi b/Documentation/web/news-front.itexi index 042bdd89b8..359699c2e3 100644 --- a/Documentation/web/news-front.itexi +++ b/Documentation/web/news-front.itexi @@ -9,10 +9,10 @@ @c used for news about the upcoming release; see CG 10.2 @newsItem -@subheading LilyPond 2.19.37 released @emph{February 28, 2016} +@subheading LilyPond 2.19.38 released @emph{March 13, 2016} We are happy to announce the release of LilyPond -2.19.37. This release includes a number of enhancements, and contains some +2.19.38. This release includes a number of enhancements, and contains some work in progress. You will have access to the very latest features, but some may be incomplete, and you may encounter bugs and crashes. If you require a stable version of Lilypond, we recommend using the 2.18 diff --git a/Documentation/web/news.itexi b/Documentation/web/news.itexi index 38f8202d48..3bba58437d 100644 --- a/Documentation/web/news.itexi +++ b/Documentation/web/news.itexi @@ -26,6 +26,18 @@ NOTE: * don't duplicate entries from news-front.itexi @end ignore +@newsItem +@subheading LilyPond 2.19.37 released @emph{February 28, 2016} + +We are happy to announce the release of LilyPond +2.19.37. This release includes a number of enhancements, and contains some +work in progress. You will have access to the very latest features, but +some may be incomplete, and you may encounter bugs and crashes. If you +require a stable version of Lilypond, we recommend using the 2.18 +version. + +@newsEnd + @newsItem @subheading LilyPond 2.19.36 released @emph{January 31, 2016} diff --git a/VERSION b/VERSION index 2ebe46f471..c9956eca56 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=19 -PATCH_LEVEL=38 +PATCH_LEVEL=39 MY_PATCH_LEVEL= VERSION_STABLE=2.18.2 -VERSION_DEVEL=2.19.37 +VERSION_DEVEL=2.19.38 diff --git a/input/regression/identifier-alists.ly b/input/regression/identifier-alists.ly new file mode 100644 index 0000000000..e70713e6b0 --- /dev/null +++ b/input/regression/identifier-alists.ly @@ -0,0 +1,20 @@ +\version "2.19.39" + +\header { + texidoc = "Music variables may be structured into alists +indexed by numbers or symbols." +} + +\layout { ragged-right = ##t } + +violin.1 = { e''-\markup \typewriter "\\violin.1" } +violin.2 = { c'-\markup \typewriter "\\violin.2" } +viola.I = { e-\markup \typewriter "\\viola.I" } +viola.II = { c-\markup \typewriter "\\viola.II" } + +\score { + << + \new Staff << \violin.1 \\ \violin.2 >> + \new Staff \with { \clef "alto" } << \viola.I \\ \viola.II >> + >> +} diff --git a/input/regression/notehead-height.ly b/input/regression/notehead-height.ly new file mode 100644 index 0000000000..badad176f8 --- /dev/null +++ b/input/regression/notehead-height.ly @@ -0,0 +1,15 @@ +\version "2.19.38" + +\header { + texidoc=" +Noteheads do not extend above the upper staff line. +" +} + +\new Voice \with { + \override NoteHead.color = #green + } { + \relative { + f'4 a c e \bar "|." + } +} diff --git a/lily/context-property.cc b/lily/context-property.cc index 534fced49a..e0acae1455 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -39,10 +39,11 @@ general_pushpop_property (Context *context, SCM grob_property_path, SCM new_value) { + // Numbers may appear, but not in first place if (!scm_is_symbol (context_property) || !scm_is_symbol (scm_car (grob_property_path))) { - warning (_ ("need symbol arguments for \\override and \\revert")); + warning (_ ("need symbol argument for \\override and \\revert")); if (do_internal_type_checking_global) assert (false); } diff --git a/lily/include/context.hh b/lily/include/context.hh index c4af7bce05..130a304f93 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -193,9 +193,11 @@ void set_context_property_on_children (Context *trans, SCM sym, SCM val); } while (0) SCM nested_property_alist (SCM alist, SCM prop_path, SCM value); +SCM nested_property (SCM alist, SCM prop_path, SCM fallback = SCM_EOL); SCM nested_create_alist (SCM prop_path, SCM value); SCM partial_list_copy (SCM alist, SCM tail, SCM newtail); SCM assq_tail (SCM key, SCM alist, SCM alist_end); +SCM assv_tail (SCM key, SCM alist, SCM alist_end); SCM assoc_tail (SCM key, SCM alist, SCM alist_end); SCM evict_from_alist (SCM, SCM, SCM); SCM nalist_to_alist (SCM nalist, int nested); diff --git a/lily/include/lily-imports.hh b/lily/include/lily-imports.hh index 28f6e93562..97982895f5 100644 --- a/lily/include/lily-imports.hh +++ b/lily/include/lily-imports.hh @@ -65,6 +65,8 @@ namespace Lily { extern Variable hash_table_to_alist; extern Variable interpret_markup_list; extern Variable invalidate_alterations; + extern Variable key_p; + extern Variable key_list_p; extern Variable key_signature_interface_alteration_positions; extern Variable layout_extract_page_properties; extern Variable lilypond_main; diff --git a/lily/lily-imports.cc b/lily/lily-imports.cc index a62216e084..adc9124fb7 100644 --- a/lily/lily-imports.cc +++ b/lily/lily-imports.cc @@ -59,6 +59,8 @@ namespace Lily { Variable hash_table_to_alist ("hash-table->alist"); Variable interpret_markup_list ("interpret-markup-list"); Variable invalidate_alterations ("invalidate-alterations"); + Variable key_p ("key?"); + Variable key_list_p ("key-list?"); Variable key_signature_interface_alteration_positions ("key-signature-interface::alteration-positions"); Variable layout_extract_page_properties ("layout-extract-page-properties"); Variable lilypond_main ("lilypond-main"); diff --git a/lily/nested-property.cc b/lily/nested-property.cc index 7c8b13047d..edb7986a51 100644 --- a/lily/nested-property.cc +++ b/lily/nested-property.cc @@ -37,9 +37,24 @@ assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL) return SCM_BOOL_F; } +SCM +assv_tail (SCM key, SCM alist, SCM based_on = SCM_EOL) +{ + for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p)) + { + if (scm_is_true (scm_eqv_p (scm_caar (p), key))) + return p; + } + return SCM_BOOL_F; +} + SCM assoc_tail (SCM key, SCM alist, SCM based_on = SCM_EOL) { + if (SCM_IMP (key)) + return assq_tail (key, alist, based_on); + if (scm_is_number (key) || scm_is_true (scm_char_p (key))) + return assv_tail (key, alist, based_on); for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p)) { if (ly_is_equal (scm_caar (p), key)) @@ -68,10 +83,8 @@ SCM assq_pop_x (SCM key, SCM *alist) SCM evict_from_alist (SCM key, SCM alist, SCM alist_end) { -// shortcircuit to an eq-using assoc_tail variant when key is a symbol -// (common case) - SCM p = scm_is_symbol (key) ? assq_tail (key, alist, alist_end) - : assoc_tail (key, alist, alist_end); + SCM p = assoc_tail (key, alist, alist_end); + if (scm_is_true (p)) return partial_list_copy (alist, p, scm_cdr (p)); return alist; @@ -112,7 +125,8 @@ nested_property_alist (SCM alist, SCM prop_path, SCM value) SCM rest = scm_cdr (prop_path); if (scm_is_pair (rest)) { - SCM where = assq_tail (key, alist); + SCM where = assoc_tail (key, alist); + if (scm_is_false (where)) return scm_acons (key, nested_create_alist (rest, value), alist); return scm_acons (key, nested_property_alist (scm_cdar (where), @@ -131,6 +145,19 @@ nested_property_alist (SCM alist, SCM prop_path, SCM value) return scm_acons (key, value, alist); } +SCM +nested_property (SCM alist, SCM prop_path, SCM fallback) +{ + for (; scm_is_pair (prop_path); prop_path = scm_cdr (prop_path)) + { + SCM tail = assoc_tail (scm_car (prop_path), alist); + if (scm_is_false (tail)) + return fallback; + alist = scm_cdar (tail); + } + return alist; +} + void set_nested_property (Grob *me, SCM big_to_small, SCM value) { @@ -144,7 +171,12 @@ set_nested_property (Grob *me, SCM big_to_small, SCM value) // This converts an alist with nested overrides in it to a proper // alist. The number of nested overrides is known in advance, // everything up to the last nested override is copied, the tail is -// shared +// shared. +// +// The first nalist index has to be a symbol since the conversion +// relies on eq? comparisons, uses some special non-symbol values for +// special purposes, and does validity checking indexed by symbols. +// Subindexing can be done with equal?-comparable indexes, however. SCM nalist_to_alist (SCM nalist, int nested) @@ -179,7 +211,7 @@ nalist_to_alist (SCM nalist, int nested) scm_set_cdr_x (pair, scm_cons (elt, scm_cdr (pair))); continue; } - + assert (scm_is_symbol (key)); // plain override: apply any known corresponding partials SCM pair = assq_pop_x (key, &partials); if (scm_is_true (pair)) diff --git a/lily/parser.yy b/lily/parser.yy index 3e7625f45f..7a11d05fc9 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -119,6 +119,7 @@ FIXME: using namespace std; #include "book.hh" +#include "context.hh" #include "context-def.hh" #include "context-mod.hh" #include "dimensions.hh" @@ -353,6 +354,7 @@ If we give names, Bison complains. %token EVENT_IDENTIFIER %token EVENT_FUNCTION %token FRACTION +%token LOOKUP_IDENTIFIER %token LYRIC_ELEMENT %token MARKUP_FUNCTION %token MARKUP_LIST_FUNCTION @@ -492,6 +494,15 @@ toplevel_expression: } ; +lookup: + LOOKUP_IDENTIFIER + | LOOKUP_IDENTIFIER '.' symbol_list_rev + { + $$ = loc_on_music (parser, @$, + nested_property ($1, scm_reverse_x ($3, SCM_EOL))); + } + ; + embedded_scm_bare: SCM_TOKEN { @@ -503,6 +514,7 @@ embedded_scm_bare: embedded_scm_active: SCM_IDENTIFIER | scm_function_call + | lookup ; embedded_scm_bare_arg: @@ -520,6 +532,7 @@ embedded_scm_bare_arg: | book_block | bookpart_block | output_def + | lookup ; /* The generic version may end in music, or not */ @@ -527,6 +540,7 @@ embedded_scm_bare_arg: embedded_scm: embedded_scm_bare | scm_function_call + | lookup ; /* embedded_scm_arg is _not_ casting pitches to music by default, this @@ -644,12 +658,12 @@ assignment: parser->lexer_->set_identifier ($1, $3); $$ = SCM_UNSPECIFIED; } - | assignment_id property_path '=' identifier_init { - SCM path = scm_cons (scm_string_to_symbol ($1), $2); - parser->lexer_->set_identifier (path, $4); + | assignment_id '.' property_path '=' identifier_init { + SCM path = scm_cons (scm_string_to_symbol ($1), $3); + parser->lexer_->set_identifier (path, $5); $$ = SCM_UNSPECIFIED; } - | assignment_id '.' property_path '=' identifier_init { + | assignment_id ',' property_path '=' identifier_init { SCM path = scm_cons (scm_string_to_symbol ($1), $3); parser->lexer_->set_identifier (path, $5); $$ = SCM_UNSPECIFIED; @@ -1673,6 +1687,10 @@ symbol_list_arg: { $$ = scm_append (scm_list_2 ($1, scm_reverse_x ($3, SCM_EOL))); } + | SYMBOL_LIST ',' symbol_list_rev + { + $$ = scm_append (scm_list_2 ($1, scm_reverse_x ($3, SCM_EOL))); + } ; symbol_list_rev: @@ -1681,6 +1699,10 @@ symbol_list_rev: { $$ = scm_append_x (scm_list_2 ($3, $1)); } + | symbol_list_rev ',' symbol_list_part + { + $$ = scm_append_x (scm_list_2 ($3, $1)); + } ; // symbol_list_part delivers elements in reverse copy. @@ -1688,9 +1710,9 @@ symbol_list_rev: symbol_list_part: symbol_list_element { - $$ = try_string_variants (Lily::symbol_list_p, $1); + $$ = try_string_variants (Lily::key_list_p, $1); if (SCM_UNBNDP ($$)) { - parser->parser_error (@1, _("not a symbol")); + parser->parser_error (@1, _("not a key")); $$ = SCM_EOL; } else $$ = scm_reverse ($$); @@ -1701,6 +1723,7 @@ symbol_list_part: symbol_list_element: STRING | embedded_scm_bare + | UNSIGNED ; @@ -1874,6 +1897,8 @@ function_arglist_nonbackup_reparse: if (scm_is_true (scm_call_1 ($2, $4))) // May be 3 \cm or similar MYREPARSE (@4, $2, REAL, $4); + else if (scm_is_true (scm_call_1 ($2, scm_list_1 ($4)))) + MYREPARSE (@4, $2, SYMBOL_LIST, scm_list_1 ($4)); else { SCM d = make_duration ($4); if (!SCM_UNBNDP (d)) { @@ -1980,6 +2005,8 @@ function_arglist_backup: if (scm_is_true (scm_call_1 ($2, $4))) // May be 3 \cm or similar MYREPARSE (@4, $2, REAL, $4); + else if (scm_is_true (scm_call_1 ($2, scm_list_1 ($4)))) + MYREPARSE (@4, $2, SYMBOL_LIST, scm_list_1 ($4)); else { SCM d = make_duration ($4); if (!SCM_UNBNDP (d)) { @@ -2350,6 +2377,8 @@ function_arglist_common_reparse: if (scm_is_true (scm_call_1 ($1, $3))) // May be 3 \cm or similar MYREPARSE (@3, $1, REAL, $3); + else if (scm_is_true (scm_call_1 ($1, scm_list_1 ($3)))) + MYREPARSE (@3, $1, SYMBOL_LIST, scm_list_1 ($3)); else { SCM d = make_duration ($3); if (!SCM_UNBNDP (d)) { @@ -2545,9 +2574,6 @@ property_path: symbol_list_rev { $$ = scm_reverse_x ($1, SCM_EOL); } - | symbol_list_rev property_path { - $$ = scm_reverse_x ($1, $2); - } ; property_operation: @@ -2557,7 +2583,7 @@ property_operation: | UNSET symbol { $$ = scm_list_2 (ly_symbol2scm ("unset"), $2); } - | OVERRIDE property_path '=' scalar { + | OVERRIDE revert_arg '=' scalar { if (scm_ilength ($2) < 2) { parser->parser_error (@2, _("bad grob property path")); $$ = SCM_UNDEFINED; @@ -2621,6 +2647,10 @@ revert_arg_part: { $$ = scm_append_x (scm_list_2 ($5, $3)); } + | revert_arg_backup BACKUP SCM_ARG ',' symbol_list_part + { + $$ = scm_append_x (scm_list_2 ($5, $3)); + } | revert_arg_backup BACKUP SCM_ARG symbol_list_part { $$ = scm_append_x (scm_list_2 ($4, $3)); @@ -4017,8 +4047,12 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid) } else if (unsmob (sid)) { *destination = unsmob (sid)->clone ()->unprotect (); return SCM_IDENTIFIER; + } else if (scm_is_pair (sid) + && scm_is_pair (scm_car (sid)) + && scm_is_true (Lily::key_p (scm_caar (sid)))) { + *destination = sid; + return LOOKUP_IDENTIFIER; } - return -1; } @@ -4088,7 +4122,7 @@ try_string_variants (SCM pred, SCM str) if (scm_is_true (scm_call_1 (pred, str))) return str; // a symbol may be interpreted as a list of symbols if it helps - if (scm_is_symbol (str)) { + if (scm_is_true (Lily::key_p (str))) { str = scm_list_1 (str); if (scm_is_true (scm_call_1 (pred, str))) return str; @@ -4102,6 +4136,10 @@ try_string_variants (SCM pred, SCM str) return SCM_UNDEFINED; str = scm_string_split (str, SCM_MAKE_CHAR ('.')); + for (SCM p = str; scm_is_pair (p); p = scm_cdr (p)) + scm_set_car_x (p, scm_string_split (scm_car (p), + SCM_MAKE_CHAR (','))); + str = scm_append_x (str); for (SCM p = str; scm_is_pair (p); p = scm_cdr (p)) scm_set_car_x (p, scm_string_to_symbol (scm_car (p))); @@ -4140,7 +4178,8 @@ is_regular_identifier (SCM id, bool multiple) || (c >= 'A' && c <= 'Z') || c > 0x7f) middle = true; - else if (middle && (c == '-' || c == '_' || (multiple && c == '.'))) + else if (middle && (c == '-' || c == '_' || (multiple && + (c == '.' || c == ',')))) middle = false; else return false; diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index f34f494301..249fdce04a 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -87,6 +87,8 @@ Text_spanner_engraver::process_music () { current_event_ = event_drul_[START]; span_ = make_spanner ("TextSpanner", event_drul_[START]->self_scm ()); + if (Direction d = to_dir (current_event_->get_property ("direction"))) + span_->set_property ("direction", scm_from_int (d)); Side_position_interface::set_axis (span_, Y_AXIS); event_drul_[START] = 0; diff --git a/ly/Welcome-to-LilyPond-MacOS.ly b/ly/Welcome-to-LilyPond-MacOS.ly index df4d9c389b..ac5ca82133 100644 --- a/ly/Welcome-to-LilyPond-MacOS.ly +++ b/ly/Welcome-to-LilyPond-MacOS.ly @@ -23,7 +23,7 @@ That's it. For more information, visit http://lilypond.org . %} -\version "2.19.37" % necessary for upgrading to future LilyPond versions. +\version "2.19.38" % necessary for upgrading to future LilyPond versions. \header{ title = "A scale in LilyPond" diff --git a/ly/Welcome_to_LilyPond.ly b/ly/Welcome_to_LilyPond.ly index 5149a93d3d..365abc53dd 100644 --- a/ly/Welcome_to_LilyPond.ly +++ b/ly/Welcome_to_LilyPond.ly @@ -32,7 +32,7 @@ Good luck with LilyPond! Happy engraving. %} -\version "2.19.37" % necessary for upgrading to future LilyPond versions. +\version "2.19.38" % necessary for upgrading to future LilyPond versions. \header{ title = "A scale in LilyPond" diff --git a/ly/graphviz-init.ly b/ly/graphviz-init.ly index c8d0dfe2c3..470faffa6a 100644 --- a/ly/graphviz-init.ly +++ b/ly/graphviz-init.ly @@ -24,13 +24,6 @@ #(define graph (make-empty-graph (ly:parser-output-name))) -#(define (grob-name g) - (let* ((meta (ly:grob-property g 'meta)) - (name-pair (assq 'name meta))) - (if (pair? name-pair) - (cdr name-pair) - #f))) - % an event is relevant if % (it is on some whitelist or all whitelists are empty) % and @@ -42,11 +35,11 @@ (or (= 0 (length file-line-whitelist) (length sym-whitelist) (length grob-whitelist)) (memq prop sym-whitelist) - (memq (grob-name grob) grob-whitelist) + (memq (grob::name grob) grob-whitelist) (member file-line file-line-whitelist)) (and (not (memq prop sym-blacklist)) - (not (memq (grob-name grob) grob-blacklist)) + (not (memq (grob::name grob) grob-blacklist)) (not (member file-line file-line-blacklist)))))) #(define (grob-event-node grob label cluster) @@ -62,18 +55,18 @@ #(define (grob-mod grob file line func prop val) (let* ((val-str (truncate-value val)) - (label (format #f "~a\\n~a:~a\\n~a <- ~a" (grob-name grob) file line prop val-str))) + (label (format #f "~a\\n~a:~a\\n~a <- ~a" (grob::name grob) file line prop val-str))) (if (relevant? grob file line prop) (grob-event-node grob label file)))) #(define (grob-cache grob prop callback value) (let* ((val-str (truncate-value value)) - (label (format #f "caching ~a.~a\\n~a -> ~a" (grob-name grob) prop callback value))) + (label (format #f "caching ~a.~a\\n~a -> ~a" (grob::name grob) prop callback value))) (if (relevant? grob #f #f prop) (grob-event-node grob label #f)))) #(define (grob-create grob file line func) - (let ((label (format #f "~a\\n~a:~a" (grob-name grob) file line))) + (let ((label (format #f "~a\\n~a:~a" (grob::name grob) file line))) (grob-event-node grob label file))) #(ly:set-grob-modification-callback grob-mod) diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 77ca2d0b00..a23d154fd8 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -93,7 +93,7 @@ markups), or inside a score.") alterBroken = #(define-music-function (property arg item) - (symbol-list-or-symbol? list? symbol-list-or-music?) + (key-list-or-symbol? list? key-list-or-music?) (_i "Override @var{property} for pieces of broken spanner @var{item} with values @var{arg}. @var{item} may either be music in the form of a starting spanner event, or a symbol list in the form @@ -908,7 +908,7 @@ octaveCheck = offset = #(define-music-function (property offsets item) - (symbol-list-or-symbol? scheme? symbol-list-or-music?) + (symbol-list-or-symbol? scheme? key-list-or-music?) (_i "Offset the default value of @var{property} of @var{item} by @var{offsets}. If @var{item} is a string, the result is @code{\\override} for the specified grob type. If @var{item} is @@ -996,7 +996,7 @@ of @var{base-moment}, @var{beat-structure}, and @var{beam-exceptions}.") overrideProperty = #(define-music-function (grob-property-path value) - (symbol-list? scheme?) + (key-list? scheme?) (_i "Set the grob property specified by @var{grob-property-path} to @var{value}. @var{grob-property-path} is a symbol list of the form @@ -1339,7 +1339,7 @@ print @var{secondary-note} as a stemless note head in parentheses.") propertyOverride = #(define-music-function (grob-property-path value) - (symbol-list? scheme?) + (key-list? scheme?) (_i "Set the grob property specified by @var{grob-property-path} to @var{value}. @var{grob-property-path} is a symbol list of the form @code{Context.GrobName.property} or @code{GrobName.property}, possibly @@ -1362,7 +1362,7 @@ command.") propertyRevert = #(define-music-function (grob-property-path) - (symbol-list?) + (key-list?) (_i "Revert the grob property specified by @var{grob-property-path} to its previous value. @var{grob-property-path} is a symbol list of the form @code{Context.GrobName.property} or @code{GrobName.property}, possibly @@ -1399,7 +1399,7 @@ Scheme as a substitute for the built-in @code{\\set} command.") propertyTweak = #(define-music-function (prop value item) - (symbol-list-or-symbol? scheme? symbol-list-or-music?) + (key-list-or-symbol? scheme? key-list-or-music?) (_i "Add a tweak to the following @var{item}, usually music. This generally behaves like @code{\\tweak} but will turn into an @code{\\override} when @var{item} is a symbol list. @@ -1630,7 +1630,7 @@ a context modification duplicating their effect.") shape = #(define-music-function (offsets item) - (list? symbol-list-or-music?) + (list? key-list-or-music?) (_i "Offset control-points of @var{item} by @var{offsets}. The argument is a list of number pairs or list of such lists. Each element of a pair represents an offset to one of the coordinates of a @@ -1887,7 +1887,7 @@ command without explicit @samp{tuplet-span}, use tweak = #(define-music-function (prop value music) - (symbol-list-or-symbol? scheme? ly:music?) + (key-list-or-symbol? scheme? ly:music?) (_i "Add a tweak to the following @var{music}. Layout objects created by @var{music} get their property @var{prop} set to @var{value}. If @var{prop} has the form @samp{Grob.property}, like with diff --git a/mf/feta-params.mf b/mf/feta-params.mf index 7f7f4a5cc2..81325dc46e 100644 --- a/mf/feta-params.mf +++ b/mf/feta-params.mf @@ -238,7 +238,19 @@ slash_thick# := 2/3 * 0.48 staff_space#; % the lines. If you like that, modify overdone heads (unit: % stafflinethickness). % -overdone_heads = 0.0; + +%% FIXME +% There is a problem with noteheads slightly extending beyond the staff +% lines. This is due to the fact that staff_space + stafflinethickness +% is sometimes an odd number, so the nothead height and depth are not +% integers. Then, when the font is converted to an outline font, the +% system rounds up the 0.5 left over from dividing the notehead height +% in two, and the notehead extends slightly beyond the staff line. +% In order to resolve this problem, we use overdone_heads to slightly +% reduce the notehead height. Empirically, we have determined that +% reducing by 10% of stafflinethickness solves the problem. + +overdone_heads = -0.1; noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#; define_pixels (slash_thick); diff --git a/po/lilypond.pot b/po/lilypond.pot index 82ab63ed9f..311c75e400 100644 --- a/po/lilypond.pot +++ b/po/lilypond.pot @@ -6,10 +6,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: lilypond 2.19.37\n" +"Project-Id-Version: lilypond 2.19.38\n" "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu." "lilypond.bugs\n" -"POT-Creation-Date: 2016-02-28 13:14+0000\n" +"POT-Creation-Date: 2016-03-13 12:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -839,52 +839,52 @@ msgstr "" msgid "Language does not support microtones contained in the piece" msgstr "" -#: musicexp.py:491 +#: musicexp.py:497 msgid "Tuplet brackets of curved shape are not correctly implemented" msgstr "" -#: musicexp.py:677 +#: musicexp.py:683 #, python-format msgid "unable to set the music %(music)s for the repeat %(repeat)s" msgstr "" -#: musicexp.py:686 +#: musicexp.py:692 msgid "encountered repeat without body" msgstr "" #. no self.elements! -#: musicexp.py:856 +#: musicexp.py:862 #, python-format msgid "Grace note with no following music: %s" msgstr "" -#: musicexp.py:1018 +#: musicexp.py:1024 #, python-format msgid "Invalid octave shift size found: %s. Using no shift." msgstr "" -#: musicexp.py:1476 +#: musicexp.py:1482 #, python-format msgid "Unable to convert alteration %s to a lilypond expression" msgstr "" #. TODO: Handle pieces without a time signature! -#: musicxml.py:361 +#: musicxml.py:362 msgid "Senza-misura time signatures are not yet supported!" msgstr "" -#: musicxml.py:379 +#: musicxml.py:380 msgid "Unable to interpret time signature! Falling back to 4/4." msgstr "" -#: musicxml.py:435 +#: musicxml.py:436 #, python-format msgid "" "Key alteration octave given for a non-existing alteration nr. %s, available " "numbers: %s!" msgstr "" -#: musicxml.py:523 +#: musicxml.py:524 #, python-format msgid "Unable to find instrument for ID=%s\n" msgstr "" @@ -1682,7 +1682,7 @@ msgstr "" msgid "natural alteration glyph not found" msgstr "" -#: all-font-metrics.cc:159 +#: all-font-metrics.cc:161 #, c-format msgid "cannot find font: `%s'" msgstr "" @@ -2131,7 +2131,7 @@ msgstr "" msgid "identifier name is a keyword: `%s'" msgstr "" -#: lily-lexer.cc:299 lily-lexer.cc:312 +#: lily-lexer.cc:301 lily-lexer.cc:314 #, c-format msgid "%s:EOF" msgstr "" @@ -2177,7 +2177,7 @@ msgstr "" msgid "Parsing..." msgstr "" -#: lookup.cc:178 +#: lookup.cc:177 #, c-format msgid "Not drawing a box with negative dimension, %.2f by %.2f." msgstr "" @@ -3103,119 +3103,119 @@ msgstr "" msgid "giving up" msgstr "" -#: parser.yy:476 parser.yy:947 parser.yy:1028 parser.yy:1248 +#: parser.yy:478 parser.yy:949 parser.yy:1030 parser.yy:1250 msgid "bad expression type" msgstr "" -#: parser.yy:859 parser.yy:1458 parser.yy:1503 +#: parser.yy:861 parser.yy:1460 parser.yy:1505 msgid "not a context mod" msgstr "" -#: parser.yy:1054 +#: parser.yy:1056 msgid "Missing music in \\score" msgstr "" -#: parser.yy:1091 +#: parser.yy:1093 msgid "\\paper cannot be used in \\score, use \\layout instead" msgstr "" -#: parser.yy:1126 +#: parser.yy:1128 msgid "Spurious expression in \\score" msgstr "" -#: parser.yy:1156 +#: parser.yy:1158 msgid "need \\paper for paper block" msgstr "" -#: parser.yy:1331 +#: parser.yy:1333 msgid "music expected" msgstr "" -#: parser.yy:1341 parser.yy:1375 +#: parser.yy:1343 parser.yy:1377 msgid "unexpected post-event" msgstr "" -#: parser.yy:1383 +#: parser.yy:1385 msgid "Ignoring non-music expression" msgstr "" -#: parser.yy:1691 +#: parser.yy:1693 msgid "not a symbol" msgstr "" -#: parser.yy:2491 parser.yy:2605 parser.yy:2618 parser.yy:2627 +#: parser.yy:2562 parser.yy:2676 parser.yy:2689 parser.yy:2698 msgid "bad grob property path" msgstr "" -#: parser.yy:2585 +#: parser.yy:2656 msgid "only \\consists and \\remove take non-string argument." msgstr "" -#: parser.yy:2646 +#: parser.yy:2717 msgid "bad context property path" msgstr "" -#: parser.yy:2731 +#: parser.yy:2802 msgid "markup expected" msgstr "" -#: parser.yy:2743 +#: parser.yy:2814 msgid "simple string expected" msgstr "" -#: parser.yy:2760 +#: parser.yy:2831 msgid "symbol expected" msgstr "" -#: parser.yy:2896 +#: parser.yy:2967 msgid "not a rhythmic event" msgstr "" -#: parser.yy:2946 +#: parser.yy:3017 msgid "post-event expected" msgstr "" -#: parser.yy:2955 parser.yy:2960 +#: parser.yy:3026 parser.yy:3031 msgid "have to be in Lyric mode for lyrics" msgstr "" -#: parser.yy:3036 +#: parser.yy:3107 msgid "expecting string or post-event as script definition" msgstr "" -#: parser.yy:3140 +#: parser.yy:3211 msgid "not an articulation" msgstr "" -#: parser.yy:3212 parser.yy:3255 +#: parser.yy:3277 parser.yy:3329 msgid "not a duration" msgstr "" -#: parser.yy:3276 +#: parser.yy:3350 msgid "bass number expected" msgstr "" -#: parser.yy:3368 +#: parser.yy:3442 msgid "have to be in Note mode for notes" msgstr "" -#: parser.yy:3407 +#: parser.yy:3481 msgid "have to be in Chord mode for chords" msgstr "" -#: parser.yy:3450 +#: parser.yy:3524 msgid "markup outside of text script or \\lyricmode" msgstr "" -#: parser.yy:3455 +#: parser.yy:3529 msgid "unrecognized string, not in text script or \\lyricmode" msgstr "" -#: parser.yy:3607 parser.yy:3616 +#: parser.yy:3681 parser.yy:3690 msgid "not an unsigned integer" msgstr "" -#: parser.yy:3703 +#: parser.yy:3777 msgid "not a markup" msgstr "" @@ -3457,16 +3457,16 @@ msgstr "" msgid "bad make-music argument: ~S" msgstr "" -#: define-note-names.scm:1000 +#: define-note-names.scm:1107 msgid "Select note names language." msgstr "" -#: define-note-names.scm:1006 +#: define-note-names.scm:1113 #, scheme-format msgid "Using `~a' note names..." msgstr "" -#: define-note-names.scm:1009 +#: define-note-names.scm:1116 #, scheme-format msgid "Could not find language `~a'. Ignoring." msgstr "" @@ -3536,7 +3536,7 @@ msgstr "" msgid "do not know how to embed font ~s ~s ~s" msgstr "" -#: framework-ps.scm:728 +#: framework-ps.scm:751 msgid "" "\n" "The PostScript backend does not support the\n" @@ -3544,7 +3544,7 @@ msgid "" "\n" " lilypond -dbackend=eps FILE\n" "\n" -"If have cut & pasted a lilypond fragment from a webpage, be sure\n" +"If you have cut & pasted a lilypond fragment from a webpage, be sure\n" "to only remove anything before\n" "\n" " %% ****************************************************************\n" @@ -3610,50 +3610,50 @@ msgstr "" msgid "define-session used after session start" msgstr "" -#: lily.scm:417 +#: lily.scm:420 msgid "Using (ice-9 curried-definitions) module\n" msgstr "" -#: lily.scm:420 +#: lily.scm:423 msgid "Guile 1.8\n" msgstr "" -#: lily.scm:477 +#: lily.scm:480 #, scheme-format msgid "cannot find: ~A" msgstr "" -#: lily.scm:903 +#: lily.scm:906 msgid "Success: compilation successfully completed" msgstr "" -#: lily.scm:904 +#: lily.scm:907 msgid "Compilation completed with warnings or errors" msgstr "" -#: lily.scm:965 +#: lily.scm:968 #, scheme-format msgid "job ~a terminated with signal: ~a" msgstr "" -#: lily.scm:968 +#: lily.scm:971 #, scheme-format msgid "" "logfile ~a (exit ~a):\n" "~a" msgstr "" -#: lily.scm:990 lily.scm:1079 +#: lily.scm:993 lily.scm:1082 #, scheme-format msgid "failed files: ~S" msgstr "" -#: lily.scm:1070 +#: lily.scm:1073 #, scheme-format msgid "Redirecting output to ~a..." msgstr "" -#: lily.scm:1089 +#: lily.scm:1092 #, scheme-format msgid "Invoking `~a'...\n" msgstr "" diff --git a/python/convertrules.py b/python/convertrules.py index 3c9caad397..9de1256783 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3468,9 +3468,9 @@ def conv (str): r"\1\2.\3", str) str = re.sub (r'''(\\(?:alterBroken|overrideProperty)\s+)#?"([A-Za-z]+)\s*\.\s*([A-Za-z]+)"''', r"\1\2.\3", str) - str = re.sub (r'''(\\tweak\s+)#?"?([A-Za-z]+)"?\s+?#'([-A-Za-z]+)''', + str = re.sub (r'''(\\tweak\s+)#?"?([A-W][A-Za-z]*)"?\s+?#'([a-zX-Z][-A-Za-z]*)''', r"\1\2.\3", str) - str = re.sub (r'''(\\tweak\s+)#'([-A-Za-z]+)''', + str = re.sub (r'''(\\tweak\s+)#'([a-zX-Z][-A-Za-z]*)''', r"\1\2", str) str = re.sub ("(" + matchmarkup + ")|" + r"(\\footnote(?:\s*" diff --git a/python/musicexp.py b/python/musicexp.py index 86eb2b1cfe..f6b47c3c93 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -491,11 +491,11 @@ class TimeScaledMusic (MusicWrapper): def print_ly (self, func): if self.display_bracket == None: - func ("\\once \\override TupletBracket #'stencil = ##f") + func ("\\once \\omit TupletBracket") func.newline () elif self.display_bracket == "curved": ly.warning (_ ("Tuplet brackets of curved shape are not correctly implemented")) - func ("\\once \\override TupletBracket #'stencil = #ly:slur::print") + func ("\\once \\override TupletBracket.stencil = #ly:slur::print") func.newline () base_number_function = {None: "#f", @@ -519,12 +519,12 @@ class TimeScaledMusic (MusicWrapper): if self.display_type == "actual" and self.normal_type: # Obtain the note duration in scheme-mode, i.e. \longa as \\longa base_duration = self.normal_type.ly_expression (None, True) - func ("\\once \\override TupletNumber #'text = #(tuplet-number::append-note-wrapper %s \"%s\")" % + func ("\\once \\override TupletNumber.text = #(tuplet-number::append-note-wrapper %s \"%s\")" % (base_number_function, base_duration)) func.newline () elif self.display_type == "both": # TODO: Implement this using actual_type and normal_type! if self.display_number == None: - func ("\\once \\override TupletNumber #'stencil = ##f") + func ("\\once \\omit TupletNumber") func.newline () elif self.display_number == "both": den_duration = self.normal_type.ly_expression (None, True) @@ -534,20 +534,20 @@ class TimeScaledMusic (MusicWrapper): else: num_duration = den_duration if (self.display_denominator or self.display_numerator): - func ("\\once \\override TupletNumber #'text = #(tuplet-number::non-default-fraction-with-notes %s \"%s\" %s \"%s\")" % + func ("\\once \\override TupletNumber.text = #(tuplet-number::non-default-fraction-with-notes %s \"%s\" %s \"%s\")" % (self.display_denominator, den_duration, self.display_numerator, num_duration)) func.newline () else: - func ("\\once \\override TupletNumber #'text = #(tuplet-number::fraction-with-notes \"%s\" \"%s\")" % + func ("\\once \\override TupletNumber.text = #(tuplet-number::fraction-with-notes \"%s\" \"%s\")" % (den_duration, num_duration)) func.newline () else: if self.display_number == None: - func ("\\once \\override TupletNumber #'stencil = ##f") + func ("\\once \\omit TupletNumber") func.newline () elif self.display_number == "both": - func ("\\once \\override TupletNumber #'text = #%s" % base_number_function) + func ("\\once \\override TupletNumber.text = #%s" % base_number_function) func.newline () func ('\\times %d/%d ' % @@ -1050,7 +1050,7 @@ class GlissandoEvent (SpanEvent): "wavy" : "zigzag" }. get (self.line_type, None) if style: - printer.dump ("\\once \\override Glissando #'style = #'%s" % style) + printer.dump ("\\once \\override Glissando.style = #'%s" % style) def ly_expression (self): return {-1: '\\glissando', 1:''}.get (self.span_direction, '') @@ -1257,12 +1257,12 @@ class NotestyleEvent (Event): self.filled = None def pre_chord_ly (self): if self.style: - return "\\once \\override NoteHead #'style = #%s" % self.style + return "\\once \\override NoteHead.style = #%s" % self.style else: return '' def pre_note_ly (self, is_chord_element): if self.style and is_chord_element: - return "\\tweak #'style #%s" % self.style + return "\\tweak style #%s" % self.style else: return '' def ly_expression (self): @@ -1521,7 +1521,7 @@ class TimeSignatureChange (Music): if self.style == "common": st = "\\defaultTimeSignature" elif (self.style != "'()"): - st = "\\once \\override Staff.TimeSignature #'style = #%s " % self.style + st = "\\once \\override Staff.TimeSignature.style = #%s " % self.style elif (self.style != "'()") or is_common_signature: st = "\\numericTimeSignature" @@ -1618,9 +1618,9 @@ class StaffLinesEvent (Music): self.lines = lines def ly_expression (self): if (self.lines > 0): - return "\\stopStaff \\override Staff.StaffSymbol #'line-count = #%s \\startStaff" % self.lines + return "\\stopStaff \\override Staff.StaffSymbol.line-count = #%s \\startStaff" % self.lines else: - return "\\stopStaff \\revert Staff.StaffSymbol #'line-count \\startStaff" + return "\\stopStaff \\revert Staff.StaffSymbol.line-count \\startStaff" class TempoMark (Music): def __init__ (self): @@ -1797,7 +1797,7 @@ class StaffGroup: if self.instrument_name or self.short_instrument_name: printer.dump ("\\consists \"Instrument_name_engraver\"") if self.spanbar == "no": - printer.dump ("\\override SpanBar #'transparent = ##t") + printer.dump ("\\hide SpanBar") brack = {"brace": "SystemStartBrace", "none": "SystemStartBar", "line": "SystemStartSquare"}.get (self.symbol, None) diff --git a/scm/c++.scm b/scm/c++.scm index badac67e5c..a455afdd78 100644 --- a/scm/c++.scm +++ b/scm/c++.scm @@ -60,6 +60,22 @@ (define-public (boolean-or-symbol? x) (or (boolean? x) (symbol? x))) +(define-public (key? x) + (or (symbol? x) (index? x))) + +(define-public (key-list? x) + (and (list? x) (every key? x))) + +(define-public (key-list-or-music? x) + (if (list? x) + (every key? x) + (ly:music? x))) + +(define-public (key-list-or-symbol? x) + (if (list? x) + (every key? x) + (symbol? x))) + (define-public (symbol-list? x) (and (list? x) (every symbol? x))) diff --git a/scm/lily.scm b/scm/lily.scm index 3d7a326c64..5ead4e6c9c 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -678,6 +678,10 @@ messages into errors.") (,fraction? . "fraction, as pair") (,grob-list? . "list of grobs") (,index? . "non-negative integer") + (,key? . "index or symbol") + (,key-list? . "list of indexes or symbols") + (,key-list-or-music? . "key list or music") + (,key-list-or-symbol? . "key list or symbol") (,markup? . "markup") (,markup-command-list? . "markup command list") (,markup-list? . "markup list") diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 5cf53339a4..b1cc496f6e 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -331,7 +331,7 @@ def staff_attributes_to_lily_staff (mxl_attr): staff = musicexp.Staff () # TODO: Handle case with lines <> 5! if (lines != 5): - staff.add_context_modification ("\\override StaffSymbol #'line-count = #%s" % lines) + staff.add_context_modification ("\\override StaffSymbol.line-count = #%s" % lines) return staff