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))
                              point-and-click))))

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

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

Urs

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

Reply via email to