[Top][All Lists]

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

Result of (ly:get-option 'point-and-click)

From: Urs Liska
Subject: Result of (ly:get-option 'point-and-click)
Date: Tue, 19 Jan 2016 11:19:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

Hi devs,

please consider

#(if (ly:get-option 'point-and-click)
     (let ((point-and-click (ly:get-option 'point-and-click)))
       (display point-and-click)))

Can this ever print anything else than #t ?

As far as I can see
    (ly:get-option 'point-and-click)

can return either #t or #f, is that right?

And if that's right what is the code in output-ps.scm for:

  (if (ly:get-option 'point-and-click)
      (let* ((cause (ly:grob-property grob 'cause))
             (music-origin (if (ly:stream-event? cause)
                               (ly:event-property cause 'origin)))
             (point-and-click (ly:get-option 'point-and-click)))
        (if (and
             (ly:input-location? music-origin)
             (cond ((boolean? point-and-click) point-and-click)
                   ((symbol? point-and-click)
                    (ly:in-event-class? cause point-and-click))
                   (else (any (lambda (t)
                                (ly:in-event-class? cause t))

It looks that all this code is only executed when point-and-click is
set, so I don't see why all this code has to be executed.
As a test I replaced the conditional by a simple
    (if (ly:input-location? music-origin)
and a few test scores compiled with proper point-and-click in the output

So: Is there a reason for this code or can I remove it?


reply via email to

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