On Fri, Jul 31, 2009 at 2:44 PM, Trevor Daniels<t.dani...@treda.co.uk> wrote:
>
> Mark Polesky wrote Friday, July 31, 2009 8:51 PM
>>
>> I'm okay with it. But I'd like to see what the others think. Am
>> I correct in thinking that if an object returns #t for this test
>> from within a .ly file, it qualifies as a "parser variable"?
>>
>> #(defined? 'object-name)
>
> Sorry, I don't know.  Anyone else?

I *think* that's true.

For example, in a \paper block, you could do:

  \paper {
    annotate-spacing = ##t
    #(display (defined? 'annotate-spacing))
  }

or

  \paper {
    #(define annotate-spacing #t)
    #(display (defined? 'annotate-spacing))
  }

Both display true.  But this will display false:

  \paper {
    #(display (defined? 'annotate-spacing))
  }

The same should be true for variable assignments outside of \paper,
\layout, and \header too.  I recently read about this in the Guile
manual:

http://www.gnu.org/software/guile/manual/html_node/Binding-Constructs.html#Binding-Constructs


HTH,
Patrick


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to