Am 30.08.2012 01:46, schrieb thomasmorle...@googlemail.com:
Great work so far.
Some minor suggestions:
http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm
File scm/bar-line.scm (right):
http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode203
scm/bar-line.scm:203:
If a user defines some curious bar-lines like:
#(define-bar-line "|SS...SS|" "|SS.." "..SS|" "|==...==|")
LilyPond will create some weird output without any hint whats wrong, I'd
suggest adding a warning like:
(map (lambda (x) (if (not (assoc-get x bar-glyph-alist))
(ly:warning (_ "bar-glyph ~a has to be defined before, in
separate
definition") x)))
(list eol-glyph bol-glyph))
and to change the order of the predefined bar-lines at the bottom of the
file.
Thanks for spotting this!
I decided to give a warning and an empty stencil; this has the advantage
of the
order of the definitions is not relevant.
http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode212
scm/bar-line.scm:212:
If a user defines his own bar-line and chooses a glyph with
string-length greater than 1, compiling will fail without a useful
log-message.
I'd suggest:
(define-public (add-bar-glyph-print-procedure glyph proc)
"Specify the single glyph @var{glyph} that calls print procedure
@var{proc}.
The procedure @var{proc} has to be defined in the form
@code{(make-...-bar-line grob extent)} even if the @var{extent}
is not used within the routine."
(if (or (not (string? glyph))
(> (string-length glyph) 1))
(ly:warning (_ "glyph ~a is not of string-length 1") glyph)
(set! bar-glyph-print-procedures
(acons glyph proc bar-glyph-print-procedures))))
or sth like this
Of course! Done.
http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode878
scm/bar-line.scm:878: (define-bar-line ":.|.:" ":|." ".|:" " .|.")
The following to lines should be moved to the position directly after
;;repeats
(see my comment above)
http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode882
scm/bar-line.scm:882: (define-bar-line ":|]" "|" ":|]" " |")
I think it should be:
(define-bar-line ":|]" ":|]" "" " |")
Oh well ...
Done.
http://codereview.appspot.com/6498052/
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel