From 51df6e1fc303fee6f7fabd16a71465dad97c5a38 Mon Sep 17 00:00:00 2001 From: Heikki Junes Date: Sun, 8 Dec 2002 21:51:51 +0000 Subject: [PATCH] C-c C-k kill all jobs. --- ChangeLog | 5 +++++ lilypond-mode.el | 23 +++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ab6ae450b..f49f6842a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-12-09 Heikki Junes + + * lilypond-mode.el (LilyPond-kill-job): Kill all Lilypond compiling + jobs at the same time. Add horizontal lines to Command menu. + 2002-12-08 Heikki Junes * lilypond-mode.el: Use LilyPond-command-alist for Midi and MidiAll. diff --git a/lilypond-mode.el b/lilypond-mode.el index 2f584f51b7..55741084ba 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -165,11 +165,19 @@ in LilyPond-include-path." (and process (eq (process-status process) 'run)))) -(defun LilyPond-kill-job () - "Kill the currently running LilyPond job." +(defun LilyPond-kill-jobs () + "Kill the currently running LilyPond compiling jobs." (interactive) - ;; What bout TeX, Xdvi? - (quit-process (get-process "lilypond") t)) + (let ((process-names (list "lilypond" "tex" "2dvi" "2ps" "2midi" + "book" "latex")) + (killed nil)) + (while (setq process-name (pop process-names)) + (setq process (get-process process-name)) + (if (and process + (eq (process-status process) 'run)) + (progn (quit-process process t) + (setq killed t)))) + killed)) ;; URG, should only run LilyPond-compile for LilyPond ;; not for tex,xdvi (ly2dvi?) @@ -313,7 +321,7 @@ in LilyPond-include-path." ("TeX" . ("tex '\\nonstopmode\\input %t'" . "View")) ("2Dvi" . ("ly2dvi %s" . "View")) - ("2PS" . ("ly2dvi -P %s" . "View")) + ("2PS" . ("ly2dvi -P %s" . "ViewPS")) ("2Midi" . ("lilypond -m %s" . "View")) ("Book" . ("lilypond-book %x" . "LaTeX")) @@ -590,7 +598,7 @@ command." (define-key LilyPond-mode-map "\C-c\C-l" 'LilyPond-command-lilypond) (define-key LilyPond-mode-map "\C-c\C-r" 'LilyPond-command-region) (define-key LilyPond-mode-map "\C-c\C-b" 'LilyPond-command-buffer) - (define-key LilyPond-mode-map "\C-c\C-k" 'LilyPond-kill-job) + (define-key LilyPond-mode-map "\C-c\C-k" 'LilyPond-kill-jobs) (define-key LilyPond-mode-map "\C-c\C-c" 'LilyPond-command-master) (define-key LilyPond-mode-map "\C-c\C-d" 'LilyPond-command-formatdvi) (define-key LilyPond-mode-map "\C-c\C-f" 'LilyPond-command-formatps) @@ -886,9 +894,12 @@ command." '([ "2Midi" (LilyPond-command (LilyPond-command-menu "2Midi") 'LilyPond-master-file)]) '([ "Book" (LilyPond-command (LilyPond-command-menu "Book") 'LilyPond-master-file) ]) '([ "LaTeX" (LilyPond-command (LilyPond-command-menu "LaTeX") 'LilyPond-master-file) ]) + '([ "Kill jobs" LilyPond-kill-jobs t]) + '("-----") '([ "SmartView" LilyPond-command-smartview t]) '([ "View" LilyPond-command-view t]) '([ "ViewPS" LilyPond-command-viewps t]) + '("-----") '([ "Midi (toggle)" LilyPond-command-current-midi t]) '([ "Midi all" LilyPond-command-all-midi t]) )) -- 2.39.5