From: Jan Djärv Date: Fri, 28 Mar 2008 10:06:13 +0000 (+0000) Subject: (compilation-mode-tool-bar-map): Only enable X-Git-Tag: emacs-pretest-23.0.90~6841 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5af370aba7b475ed08dd718d8966c58af421328d;p=emacs.git (compilation-mode-tool-bar-map): Only enable kill if a process is running. --- 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