David Kastrup [Thu, 19 Sep 2013 12:52:26 +0000 (14:52 +0200)]
Issue 3565: Doc, EG: LilyPond's getting too smart for the "Inline Scheme code" section
The "Inline Scheme code" section already was embarrassing enough
during its last revision, when a trivial syntactic change was all that
was required in order to have the stated problem go away without
requiring to revert to Scheme.
Since then, the situation has further deteriorated: the originally
"what we would like to do but it fails" example works entirely
unchanged without a hitch.
David Kastrup [Wed, 18 Sep 2013 18:57:59 +0000 (20:57 +0200)]
Issue 3563: Allow define-*-function to accept currying definitions
This is actually only useful for define-scheme-function since the
purpose of a currying definition is to return a function rather than a
music expression. A typical usage case would be a function creating
an engraver closure:
David Kastrup [Thu, 12 Sep 2013 20:05:07 +0000 (22:05 +0200)]
Issue 3553/2: When creating a hierarchy above Bottom, all intermediate levels are named "\new"
Previously, get_default_interpreter gave all intermediate levels the
same id as that of the new Bottom level.
However, since issue 3225, there can be more than one Bottom in one
hierarchy since a Bottom context (defined by not having a
\defaultchild) can still have children contexts (of any type it
\accepts even while it would not create them implicitly).
So it is a bad idea to give implicitly created contexts the same id as
any explicitly named context.
David Kastrup [Sun, 15 Sep 2013 13:53:51 +0000 (15:53 +0200)]
Issue 3555: Parse context definitions and context modifications in \notemode
Since context modifications and context definitions are somewhat more
concerned with musical content, it makes sense to parse them in a mode
where note names are recognized and can be used in music and scheme
function arguments.
The main argument for a separate INITIAL lexer mode is for being able
to specify REAL number values in a lenient syntax, such as .5\cm.
However, dimensions are almost never used in context definitions
or modifications but rather in output definitions like layout, midi,
paper and header blocks.
Build: Disallow metapost versions 1.600 <= x < 1.803.
Add a check in ./configure to avoid buggy versions of metapost
starting with the rewrite that occured in the 1.600 series and
finally fixed in version 1.803 and later.
Fixes issue 3539: Configure should forbid mpost 1.802 from TexLive 2013
http://code.google.com/p/lilypond/issues/detail?id=3539
Build: Dependencies for metafont files (issue 779).
Write .dep files containing make dependency rules for .mf files,
allowing to simply type `make' to process the fonts after changing
an input'ed file and have the fonts updated with the minimum amount
of processing.
These .dep files are generated by recursively scanning for lines
of the form "input X;" in the .mf files, and looking up these
input'ed files within the mf source directory. The .dep files are
included into the build by stepmake/generic-targets.make.
Fixes issue 779: fonts should be rebuilt upon modifications to mf/
http://code.google.com/p/lilypond/issues/detail?id=779
David Kastrup [Sat, 14 Sep 2013 09:09:18 +0000 (11:09 +0200)]
Issue 3552: Don't modify lists returned by markup list functions in interpret-markup-list
This requires either
a) copying any list manually
b) interpreting markup lists right-to-left
c) more complicated and/or non-O(n) algorithms
This patch chooses b). Modifying the lists is not really appropriate
since the lists may be created by user-written markup commands and any
problems resulting from not expecting modifications of the return
value might be quite hard to debug.
David Kastrup [Sun, 15 Sep 2013 09:01:06 +0000 (11:01 +0200)]
Issue 3554: Avoid empty grammar rules using @$ for getting a source location
Several rules use @$ for getting the source position from an empty
rule, but Bison does not even provide a source position for empty
rules.
This patch fixes most cases by letting different non-empty rules
assign the respective source positions. The case of #{ #} cannot be
fixed in that manner since there is not a single token providing a
source position in the whole production. Fixing this particular case
would require a different technique.
David Kastrup [Sun, 8 Sep 2013 21:50:16 +0000 (23:50 +0200)]
Issue 3297: Make lexer more robust against unexpected EOF in main input
This approach works by letting Lily_lexer::pop_state not cross the
maininput threshold. Since Lily_lexer::pop_state is the "cooked" form
of yy_pop_state (also hiding the extratoken machinery), this keeps the
"maininput" state firmly under the lexer's control and avoids exiting
it prematurely.
Use a single rule to build header and source files from
the syntax file, thus avoiding any possibility to have
`make' rebuild one but not the other, which might happen
if the syntax and target files have almost the same but
slightly differing timestamps.
See http://www.mail-archive.com/bug-lilypond@gnu.org/msg37081.html
Fixes issue 3528: Keep bison-generated files in sync.
http://code.google.com/p/lilypond/issues/detail?id=3528
Frédéric Bron [Fri, 23 Aug 2013 15:30:34 +0000 (17:30 +0200)]
Issue 3531: replaced function argument 'string' by 'const string&' where it makes sense to avoid unnecessary copying of 'string' objects.
Measurements on x86_64 (i7-2760QM, 2.40GHz) Fedora 19 with g++ 4.8.1, with
configure --enable-optimising --disable-debugging; tests run 10 times, average
elapsed time compared (/usr/bin/time)
* Bach, Concerto in E major or violin and strings, BWV 1042 (Mutopia source),
38 pages:
$ lilypond score.ly -> master: 15.4s, with patch: -0.1%
* lilypond regression tests (1153 .ly files):
$ lilypond *.ly -> master: 276.6s, with patch: -2.5%
Keith OHara [Thu, 29 Aug 2013 17:43:40 +0000 (10:43 -0700)]
markup: some skylines should not follow printed shapes; issue 3522
Implement the stencil tag 'transparent to support proper skylining of
stencils with extents different from their printed shapes, such as those
created by \transparent and \with-dimensions, or where the printed shape
is not yet known during layout, such as \page-ref.
Janek Warchol [Sun, 12 Jun 2011 22:34:45 +0000 (00:34 +0200)]
make sure that AmbitusLine is visible for small ambits
Until now, the gap between ambitus heads and ambitus line
was constant, so either the gap had to be very small or
the line wasn't visible in case of smaller ambits (like
4th or 5th). With this patch ambitus gap will be calculated
dynamically, depending on the distance between ambitus heads.
Also, the default gap for bigger ambits is changed so that
ambitus line will end precisely in the staffline or in the
middle of staffspace.
David Kastrup [Sat, 31 Aug 2013 16:57:09 +0000 (18:57 +0200)]
Issue 3527: parser.yy: allow "scalar" to be a negative literal number
This makes the syntax of the value for \override (a hardwired syntax
construct which accepts a "scalar") and \tweak (which is a music
function accepting an expression of type "scheme?" possibly ending up
as a negative number) more comparable.