]> git.donarmstrong.com Git - lilypond.git/commitdiff
propose 2midi if midi is invoked for old midi, wait for killing.
authorHeikki Junes <heikki.junes@hut.fi>
Tue, 17 Dec 2002 23:10:05 +0000 (23:10 +0000)
committerHeikki Junes <heikki.junes@hut.fi>
Tue, 17 Dec 2002 23:10:05 +0000 (23:10 +0000)
ChangeLog
lilypond-mode.el

index ce0b6a5d3874dbe5a4ce9adbcfb2b1cec635da7a..da3b051432cb343d27e69fb8d3954aa11a19f468 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-18  Heikki Junes <hjunes@cc.hut.fi>
+
+       * lilypond-mode.el (LilyPond-command): propose 2midi if midi is
+       invoked for old midi, wait for killing.
+
 2002-12-16  Heikki Junes <hjunes@cc.hut.fi>
 
        * Documentation/user/music-glossary.tely: Finnishing.
index 5946def5652ff34eba01f377990a0e8bd47729a0..0bf1523305b8a166f0d244b6b6d7d1bd371e947a 100644 (file)
@@ -583,6 +583,16 @@ command."
                      (LilyPond-shell-process name buffer-xdvi command)))
                  (LilyPond-shell-process name buffer-xdvi command)))
            (progn
+             (if (member name (list "Midi" "MidiAll"))
+                 (if (file-newer-than-file-p
+                      (LilyPond-master-file)
+                      (concat (substring (LilyPond-master-file) 0 -3) ".midi"))
+                     (if (y-or-n-p "Midi older than source. Reformat midi?")
+                         (progn
+                           (LilyPond-command-formatmidi)
+                           (while (LilyPond-running)
+                             (message "Starts playing midi once it is built.")
+                             (sit-for 0 100))))))
              (if (string-equal name "Midi")
                  (progn
                    (setq command (concat LilyPond-midi-command " " (LilyPond-string-current-midi)))
@@ -604,7 +614,8 @@ command."
                            (progn
                              (setq job-string "no jobs")
                              (LilyPond-kill-jobs)
-                             (sit-for 0 500 nil)) ; should wait killing
+                             (while (LilyPond-running)
+                               (sit-for 0 100)))
                          (setq job-string nil)))))
 
              (setq LilyPond-command-default name)