# HG changeset patch # User Jan Dj¸«£rv # Date 1206698763 0 # Node ID 6598459f3056d7d4193032e2609067165c38cb94 # Parent 36e2d4840e38bfea9d7ed34747d1766f80dff966 (compilation-mode-tool-bar-map): Only enable kill if a process is running. diff -r 36e2d4840e38 -r 6598459f3056 lisp/progmodes/compile.el --- 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