Ian Hulin <i...@hulin.org.uk> writes: > On 03/08/12 20:40, Marc Hohl wrote: >> Hello list, >> >> I tried to simplify the make-...-bar-line functions recently >> defined in scm/bar-line.scm. >> >> However, if I replace the definition >> >> (define (make-simple-bar-line grob extent thickness) (let ((blot >> (if rounded (layout-blot-diameter grob) 0))) >> >> (ly:round-filled-box (cons 0 thickness) extent blot))) >> >> with >> >> (define (make-simple-bar-line grob extent thickness) (let* ((extent >> (ly:grob-property grob 'bar-extent)) (blot (if rounded >> (layout-blot-diameter grob) 0))) > ;; this looks odd, shouldn't the syntax be (if (condition) (then-bit) > ;; (else-bit)) ? > ;;
No. It is (if <condition> <then-bit> <else-bit>), namely if there are any parentheses, they are part of the respective expression. The <condition> is "rounded", short for "(not (eq? rounded #f))", the <then-bit> is "(layout-blot-diameter grob)", and the <else-bit> is "0". -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel