From 5af370aba7b475ed08dd718d8966c58af421328d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 28 Mar 2008 10:06:13 +0000 Subject: [PATCH] (compilation-mode-tool-bar-map): Only enable kill if a process is running. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/compile.el | 2 ++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 764d32c9ec9..1139f40eb51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-03-28 Jan Djärv + + * progmodes/compile.el (compilation-mode-tool-bar-map): Only enable + kill if a process is running. + + * progmodes/grep.el (grep-mode-tool-bar-map): The same. + 2008-03-28 Dan Nicolaescu * vc.el: Add new backend function 'status-extra-headers. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index be69da1d7f6..4ee96c6e76a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1429,6 +1429,8 @@ Returns the compilation buffer created." :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 -- 2.39.5