|
From: | Michael Käppler |
Subject: | Re: Start work on adding annotations for horizontal paper variables. |
Date: | Thu, 05 Nov 2009 11:08:08 +0100 |
User-agent: | Thunderbird 2.0.0.12 (X11/20071114) |
http://codereview.appspot.com/143071/diff/1/2#newcode38 Line 38: (define (annotate-x? layout) What about (define (annotate? layout . dir) (eq? #t (case dir (('X) (ly:output-def-lookup layout 'annotate-x-spacing)) (('Y) (ly:output-def-lookup layout 'annotate-y-spacing)) (('()) (or (annotate? layout X) (annotate? layout Y))) (else #f)))I can't get this to work, unfortunately. The rest argument will be a list, and `case' doesn't want to match '(X) or '(Y).
Hmm... I did not test this. Try this: (define annotate? layout . dir) (case (and (pair? dir) (car dir)) (('X) (ly:output-def-lookup layout 'annotate-x-spacing)) (('Y) (ly:output-def-lookup layout 'annotate-y-spacing)) ((#f) (or (annotate? layout X) (annotate? layout Y)) (else #f))) Regards, Michael
[Prev in Thread] | Current Thread | [Next in Thread] |