lilypond-devel
[Top][All Lists]
Advanced

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

Re: T2026: Use new (scm markup-facility-defs) scheme module for markup c


From: ianhulin44
Subject: Re: T2026: Use new (scm markup-facility-defs) scheme module for markup commands. (issue 5464045)
Date: Tue, 27 Dec 2011 13:07:02 +0000

On 2011/12/27 13:00:14, Ian Hulin (gmail) wrote:
On 2011/12/27 12:05:38, dak wrote:
> One problem that I keep having is that I fail to see any
documentation of how
> this is supposedly interacting with the module system.
>
> What module are user-defined markup functions placed in?
Previously, this
would
> have been a module local to the compilation unit.
They still are since patch-set 2.
> It looks like there are multiple lookups going on, yet the local
module is
supposedly starting out as a
> copy of the lily module.
>
Markup validation looks for the declaration in the current module, in
case the
new markups are nice and self-contained in the document, and then
falls back to
looking up in the '(lily) module. That way we are guaranteed access to
all the
definitions in (lily) defined in scm/define-markup-commands.scm
whatever
shenanigans have been going on in the user document, or lily documents
the user
is pulling in via \include.

Base code markup commands - defined in scm/define-markup-commands.scm
- are in
the (lily) module.  User-defined markup commands are in the local lily
scope
module (anonymous module created when the new source file is processed
in
lilypond-file in lily.scm).

> So where would be the documentation about what happens with macros
when and
> where?  What is the difference between code within Lilypond, and
code in user
> documents?
>
We maintain the stuff declared in the base code declared in
define-markup-commands.scm.  Stuff in user documents we can advise
users on how
to do it right. If lots of users develop a markup that's safe, useful,
and
someone asks for that enhancement, we put it in the base code.
> Without that information, neither developers nor users can be
expected to
> continue working with confidence.  It is also not clear to me
whether macro
> definitions will bleed between multiple compilation units on the
command line.
No they won't.  This issue was addressed by patch-set 2.  It now works
as it did
and is documented as well/badly as it was.  What information do you
feel is
needed and how do you suggest it is supplied?

Ian

Just noticed, Patch-set 4 should be entitled "Implement feedback from
patch-set 3 . . ." Sorry for any confusion.

Ian

http://codereview.appspot.com/5464045/



reply via email to

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