From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Klimov Newsgroups: gmane.emacs.devel Subject: compilation-ask-about-kill Date: Thu, 4 May 2006 13:20:58 +0300 (IDT) Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1146738105 3942 80.91.229.2 (4 May 2006 10:21:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 May 2006 10:21:45 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 04 12:21:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbaxT-0004JL-OC for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 12:21:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbaxT-0003Vo-7Q for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 06:21:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbaxD-0003Vf-Td for emacs-devel@gnu.org; Thu, 04 May 2006 06:21:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbaxA-0003VT-KY for emacs-devel@gnu.org; Thu, 04 May 2006 06:21:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbaxA-0003VQ-H8 for emacs-devel@gnu.org; Thu, 04 May 2006 06:21:00 -0400 Original-Received: from [199.203.54.24] (helo=eitan.edu) by monty-python.gnu.org with smtp (Exim 4.52) id 1Fbaxk-0003Vr-FS for emacs-devel@gnu.org; Thu, 04 May 2006 06:21:36 -0400 Original-Received: (qmail 24649 invoked from network); 4 May 2006 10:20:58 -0000 Original-Received: from unknown (HELO localhost) (127.0.0.1) by localhost with SMTP; 4 May 2006 10:20:58 -0000 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53887 Archived-At: Hi. It would be nice to allow recompilation with a single key stroke even if the previous compilation hangs. With the following patch the user can skip `A %... process is running; kill it?' if he set `compilation-ask-about-kill' to nil. --- compile.el.old 2006-05-04 13:07:12.685252800 +0200 +++ compile.el 2006-05-04 13:09:52.620011800 +0200 @@ -429,6 +429,13 @@ :group 'compilation) ;;;###autoload +(defcustom compilation-ask-about-kill t + "*Non-nil means \\[compile] asks permission to kill the running compilation. +Otherwise, it kills the previous compilation process without asking." + :type 'boolean + :group 'compilation) + +;;;###autoload (defcustom compilation-search-path '(nil) "*List of directories to search for source files named in error messages. Elements should be directory names, not file names of directories. @@ -970,9 +977,10 @@ (let ((comp-proc (get-buffer-process (current-buffer)))) (if comp-proc (if (or (not (eq (process-status comp-proc) 'run)) - (yes-or-no-p - (format "A %s process is running; kill it? " - name-of-mode))) + (or (not compilation-ask-about-kill) + (yes-or-no-p + (format "A %s process is running; kill it? " + name-of-mode)))) (condition-case () (progn (interrupt-process comp-proc) -- Regards, ASK