1;;AvoidSlurAccidentalCollision 2;;;http://code.google.com/p/lilypond/issues/detail?id=796 3(let ((tag "AvoidSlurAccidentalCollision")) 4 (if (d-Directive-chord? tag) 5 (begin 6 (d-DirectiveDelete-chord tag) 7 (d-InfoDialog (_ "Slur/Accidental avoidance removed"))) 8 (begin 9 (if (d-IsSlurStart) 10 (let ((value (d-GetUserInput "Collision Avoidance" "Give edge attraction factor for slur" "0.5"))) 11 (if (and value (string->number value)) 12 (begin 13 (d-DirectivePut-chord-prefix tag (string-append "\\once \\override Slur #'details #'edge-attraction-factor = #" value " ")) 14 (d-DirectivePut-chord-override tag DENEMO_OVERRIDE_AFFIX) 15 (d-DirectivePut-chord-display tag "(X")) ; here ) to match the string paren open 16 (d-InfoDialog (_ "Cancelled")))) 17 (d-InfoDialog (_ "Use only on a slur start to make the slur avoid accidentals on following notes"))))) 18 (d-RefreshDisplay) 19 (d-SetSaved #f)) 20