lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: input/regression/scheme-text-spanner.ly: fix problem with constants


From: dak
Subject: Re: input/regression/scheme-text-spanner.ly: fix problem with constants (issue 11614044)
Date: Tue, 23 Jul 2013 12:31:25 +0000


https://codereview.appspot.com/11614044/diff/1/input/regression/scheme-text-spanner.ly
File input/regression/scheme-text-spanner.ly (right):

https://codereview.appspot.com/11614044/diff/1/input/regression/scheme-text-spanner.ly#newcode28
input/regression/scheme-text-spanner.ly:28: (set! meta-entry (assoc-set!
meta-entry 'name grob-name))
Of course, these lines are also modifying constants.

https://codereview.appspot.com/11614044/diff/1/input/regression/scheme-text-spanner.ly#newcode81
input/regression/scheme-text-spanner.ly:81: (set! lst (assoc-set! lst
'name (car x)))
And these modify constants as well.

https://codereview.appspot.com/11614044/diff/1/input/regression/scheme-text-spanner.ly#newcode117
input/regression/scheme-text-spanner.ly:117: (event-drul (cons '()
'())))
Frankly, just throw out the crap event-drul and current-event, and
instead use event-start and event-stop instead of (car event-drul) and
(cdr event-drul).  current-event also is never set to anything except
(car event-drul), so you can just replace it with event-start.

This whole file is a huge parade of bad code.

https://codereview.appspot.com/11614044/diff/1/input/regression/scheme-text-spanner.ly#newcode157
input/regression/scheme-text-spanner.ly:157: (set! event-drul (cons '()
'())))))
You could do (set-car! event-drul '())
             (set-cdr! event-drul '())
instead in order to not create a new cons cell.

https://codereview.appspot.com/11614044/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]