On 07/06/2017 12:17 PM, Urs Liska wrote:

* notation-snippets.scale-vertical-spacing

This one is mine.
https://github.com/openlilylib/snippets/tree/master/notation-snippets/scale-vertical-spacing

Here is the problematic line 90 in definitions.ily:

  (paper (if (lilypond-less-than? "2.19.22")

It can be fixed by replacing it with:

  (paper (if (ly:version? < '(2 19 22))

and adding these two shims at the top of the file:

% borrowed from scm/lily-library.scm (added in LilyPond 2.19.57)
% can be removed when support for 2.18 is dropped

#(if (not (defined? 'lexicographic-list-compare?))
     (define (lexicographic-list-compare? op a b)
       "Lexicographically compare two lists @var{a} and @var{b} using
        the operator @var{op}. The types of the list elements have to
        be comparable with @var{op}. If the lists are of different length
        the trailing elements of the longer list are ignored."
       (let* ((ca (car a))
              (iseql (op ca ca)))
         (let loop ((ca ca) (cb (car b)) (a (cdr a)) (b (cdr b)))
           (let ((axb (op ca cb)))
             (if (and (pair? a) (pair? b)
                      (eq? axb iseql (op cb ca)))
                 (loop (car a) (car b) (cdr a) (cdr b))
                 axb))))))

#(if (not (defined? 'ly:version?))
     (define (ly:version? op ver)
       "Using the operator @var{op} compare the currently executed LilyPond
        version with a given version @var{ver} which is passed as a list of
        numbers."
       (lexicographic-list-compare? op (ly:version) ver)))


This fixes the snippet on LilyPond 2.19.41 (The most recent I have installed.)

Should I make a new branch and do a pull request for these changes, or...?

Cheers,
-Paul

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

Reply via email to