lilypond-auto
[Top][All Lists]
Advanced

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

[Lilypond-auto] Issue 3799 in lilypond: Avoid macro at top-level in ly/s


From: lilypond
Subject: [Lilypond-auto] Issue 3799 in lilypond: Avoid macro at top-level in ly/satb.ly
Date: Sun, 12 Jan 2014 09:39:43 +0000

Status: Accepted
Owner: tdanielsmusic
CC: address@hidden,  address@hidden
Labels: Type-Defect

New issue 3799 by tdanielsmusic: Avoid macro at top-level in ly/satb.ly
http://code.google.com/p/lilypond/issues/detail?id=3799


[Description paraphrased from discussion between
Devon Schudy and David Kastrop here:
https://codereview.appspot.com/41990043/ ]

The use of a macro at top level in ly/satb.ly to determine
whether a variable is defined or not is not good practice.
Furthermore, this technique will not work in Guile 2.0.

David suggested instead

"How about
define-variables =
#(define-void-function (parser location syms) (symbol-list?)
    (for-each
       (lambda (sym)
         (if (null? (ly:parser-lookup parser sym))
             (ly:parser-define parser sym *unspecified*)))))

"If you write \name for a variable with value *unspecified*, it simply
disappears in the lexer."

Trevor




--
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



reply via email to

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