[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 2503 in lilypond: Patch: Move add-grob-definit
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 2503 in lilypond: Patch: Move add-grob-definition from a snippet to scm/translation-functions.scm |
Date: |
Mon, 26 Jan 2015 17:41:41 +0000 |
Comment #7 on issue 2503 by address@hidden: Patch: Move
add-grob-definition from a snippet to scm/translation-functions.scm
https://code.google.com/p/lilypond/issues/detail?id=2503
There are a couple of things that puzzle me about this.
1. It has been asserted that the current code is "tampering with a global
variable". However, surely (set! all-grob-descriptions ...) is equivalent
to (module-set! (current-module) all-grob-descriptions ...) - i.e. the
necessary encapsulation is automatically provided by the Guile module
system. In any case, if not, it would be trivial to change the code to do
this explicitly. And then of course, e.g. where the sorting of ifaces-entry
is concerned, scheme's (sort) is non-destructive anyway (i.e. it
effectively constructs a new list and adds all the elements to it rather
than changing the existing list), so there is no problem as long as the
computed result is not assigned into the top-level module.
2. I can only find a few places in the code that actually use
all-grob-descriptions (and none that use \grobdescriptions). There are a
few .ly functions (\alterBroken, \magnifyMusic and \magnifyStaff) that use
it directly, and it is also used to set the 'translation-type?
and 'is-grob? properties, but apart from that I can find nowhere (outside
of the documentation-generator code) that uses it. What am I missing?
What I am really trying to do is to find a way to create a new visual
element (a new type of clef) within LilyPond. I'm not sure whether this is
the right way to go about it. The source is quite a maze...
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings