<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <after>GoToEmptyMeasure</after>
        <action>CheckForIncompleteMeasures</action>
        <scheme>;;; Warn about incomplete measures
(d-PushPosition)
    ;;;;This will be MoveToFirstIncompleteMeasure
(d-MoveToBeginning)
(while (d-MoveToStaffUp)
       ;;; is an expression needed here?
       #t)

(let loop ()
  (if (and  (MeasureComplete?) (d-MoveToMeasureRight) (MeasureComplete?))
      (loop)
      (if (and (MeasureComplete?) (d-MoveToStaffDown))
	  (begin (d-MoveToBeginning) 
		 (loop)))))
(if (MeasureComplete?)
    (begin
      (d-PopPosition)
      (d-WarningDialog "All measures appear complete - re-run Anacrusis etc if you have printing problems"))
    (begin 
      (d-WarningDialog "There seem to be incomplete measures; this may print strangely")
      (d-PopPushPosition)
      (d-PopPosition)))

</scheme>
        <label>Check for Irregular Measures</label>
        <tooltip>Checks each measure for complete number of beats, ignoring Anacrusis and ShortMeasure ones. Stops at anything bad.</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
