changeset 93336:6598459f3056

(compilation-mode-tool-bar-map): Only enable kill if a process is running.
author Jan Djärv <jan.h.d@swipnet.se>
date Fri, 28 Mar 2008 10:06:03 +0000
parents 36e2d4840e38
children 23a154d427d7
files lisp/progmodes/compile.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Fri Mar 28 10:05:53 2008 +0000
+++ b/lisp/progmodes/compile.el	Fri Mar 28 10:06:03 2008 +0000
@@ -1429,6 +1429,8 @@
 	 :help "Goto next error")
 	(tool-bar-local-item 
 	 "cancel" 'kill-compilation 'kill-compilation map
+	 :enable '(let ((buffer (compilation-find-buffer)))
+		    (get-buffer-process buffer))
 	 :help "Stop compilation")
 	(tool-bar-local-item 
 	 "refresh" 'recompile 'recompile map