emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compilation-ask-about-kill


From: Alexander Klimov
Subject: compilation-ask-about-kill
Date: Tue, 5 Jan 2010 16:46:07 +0200

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.

On 2006-05-04, Richard Stallman wrote:
> This is not an essential change, so we should not think about it
> now. We can think about this after the release.

Probably, enough time has passed since 2006 :-) The following patch is
adapted for the current version:

*** compile.el.~1~      2010-01-05 16:22:55.983074000 +0200
--- compile.el  2010-01-05 16:25:53.882071000 +0200
***************
*** 580,583 ****
--- 580,590 ----

  ;;;###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.
***************
*** 1193,1199 ****
        (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)))
                (condition-case ()
                    (progn
--- 1200,1207 ----
        (if comp-proc
            (if (or (not (eq (process-status comp-proc) 'run))
!                 (or (not compilation-ask-about-kill)
!                     (yes-or-no-p
!                      (format "A %s process is running; kill it? "
!                              name-of-mode))))
                (condition-case ()
                    (progn

-- 
Regards,
ASK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]