From: Heikki Junes Date: Tue, 17 Dec 2002 23:10:05 +0000 (+0000) Subject: propose 2midi if midi is invoked for old midi, wait for killing. X-Git-Tag: release/1.7.10~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=444940030b32ec00e6a14cffca84051bd3006d5c;p=lilypond.git propose 2midi if midi is invoked for old midi, wait for killing. --- diff --git a/ChangeLog b/ChangeLog index ce0b6a5d38..da3b051432 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-12-18 Heikki Junes + + * lilypond-mode.el (LilyPond-command): propose 2midi if midi is + invoked for old midi, wait for killing. + 2002-12-16 Heikki Junes * Documentation/user/music-glossary.tely: Finnishing. diff --git a/lilypond-mode.el b/lilypond-mode.el index 5946def565..0bf1523305 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -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)