Valentin Villenave <valen...@villenave.net> writes: > On Sun, Dec 4, 2011 at 5:06 PM, David Kastrup <d...@gnu.org> wrote: >> `(module-define! (current-module) (string->symbol ,token) > > Wow, interesting. I had seen such things in Nicolas' code (and in > LilyPond codebase), but couldn't understand what it was for. > >> Using module-define! beats primitive-eval. If you want to know where it >> is documented: it isn't. > > Indeed. I found an entry for module-use! but not module-define!. > >> But if you run a Guile program using >> symbol-set! (which at one time was documented), it tells you that this >> is deprecated and you should be using the module system instead. And if >> you try enough different commands with "module" in them on the Guile >> command line... > > There are a lot. (most of which seem to be undocumented so far). > >> I just asked on the Guile developer list whether this is somebody's idea >> of a joke. And I thought Lilypond documentation was bad. > > Well, it depends whether you're referring to developer-oriented > documentation or user-oriented. In the latter case, things have > greatly improved (and were'nt that bad to begin with).
A function (rather than a macro not evaluating the first argument) for setting a symbol is not what I call "developer-oriented". That's totally basic functionality. In C, you just call scm_define and that's it. But in Scheme, define is a macro that does not evaluate its first argument. I don't know whether module-define! is actually the most straightforward replacement. But it beats having nothing. > Have you had a chance to have a look at the patch I suggested? Or > should I send it to -devel, or upload it to rietveld (I hope there's > no need to, for just a couple of regtests)? Not yet. -- David Kastrup _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond