[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Re: Add $currentbook and $currentbookpart parser variables
From: |
Reinhold Kainhofer |
Subject: |
[PATCH] Re: Add $currentbook and $currentbookpart parser variables |
Date: |
Sun, 30 Aug 2009 14:50:19 +0200 |
User-agent: |
KMail/1.11.4 (Linux/2.6.28-15-generic; KDE/4.2.4; i686; ; ) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Sonntag, 30. August 2009 12:05:18 schrieb address@hidden:
> I think $currentbook and $currentbookpart (which might be hyphenized)
> ought to be initialized to #f in ly/init.ly, as $defaultheader is, and
> set to #f and the end of \book* blocks. It simplifies the test in
> add-score.
> http://codereview.appspot.com/112044/diff/1/2#newcode6
> Line 6: ((not (null? (ly:parser-lookup parser '$currentbookpart)))
> It's kind of awkward to test if the variable is a book with null?
> If $currentbook* are initialized to #f, and set to #f at the end of a
> \book* block, the test becomes:
> (cond ((ly:parser-lookup parser '$currentbookpart) ...
> cond and the first test ought to be on the same line.
Okay, it was just that without initialization, the parser-lookup returned '(),
so I thought I would use that.
- -) Changed '() to #f.
- -) Changed $currentbook to $current-book, etc.
- -) Added add-score scheme function to lily-library.scm
New patch uploaded:
http://codereview.appspot.com/112044
Okay to apply?
Cheers,
Reinhold
- --
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFKmnWMTqjEwhXvPN0RAuYSAJ4wNXLhHpfv4qwo4IvvfwKh8waXhACfXQYL
ijI6Ebaqb7y7K8rdktOX4Xw=
=d6mB
-----END PGP SIGNATURE-----