On 2013/07/23 13:52:13, david.nalesnik wrote:
Sorry, replied a bit hastily!
[...]
I've thought some more about the issue of trying to change constants
elsewhere
in the file.
Specifically, regarding the addition of the new grob description to all-grob-descriptions, would the following be any better?
So, as I understand it, remove add-grob-description, duplicating its
changes to
the description of 'SchemeTextSpanner, and creating a new variable to
avoid
tampering with all-grob-descriptions, using that new variable in the
layout
block.
No, that's not necessary. all-grob-descriptions is defined as a session variable, so it will be restored at the end of the session. You must not change it _destructively_ (meaning that you must not change any of its cons cells or what they point to), but you can replace with a different list as a whole. Since the code only added to the _front_ of all-grob-descriptions, this part was entirely harmless. The problem is rather with the code in "complete-grob-entry" or what it was. That one worked destructively on constant lists (like, one may add, our current code for creating all-grob-descriptions originally does). So what is being done is just as bad as our existing code elsewhere, but there is no interference with it. The part adding stuff to the front of all-grob-descriptions is fine by itself. https://codereview.appspot.com/11614044/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel