aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Blais2012-08-29 14:15:12 -0400
committerStefan Monnier2012-08-29 14:15:12 -0400
commitf0019ede635edc3c5898d6297f4e25769a1ad7c1 (patch)
tree055311abafa77158cfc8a8645a8bc1b5b7d1bd79
parentaf070a1c6a6373b0c854ffb94ab67aaef9582bab (diff)
downloademacs-f0019ede635edc3c5898d6297f4e25769a1ad7c1.tar.gz
emacs-f0019ede635edc3c5898d6297f4e25769a1ad7c1.zip
* lisp/progmodes/compile.el (compilation-always-kill): New var.
(compilation-start): Use it.
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/compile.el8
3 files changed, 15 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 1da3931813b..e17846cc4d0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -207,6 +207,8 @@ It copies the region-rectangle as the last rectangle kill.
207 207
208* Changes in Specialized Modes and Packages in Emacs 24.3 208* Changes in Specialized Modes and Packages in Emacs 24.3
209 209
210** Compilation has a new `compilation-always-kill' configuration variable.
211
210** Term changes 212** Term changes
211 213
212The variables `term-default-fg-color' and `term-default-bg-color' are 214The variables `term-default-fg-color' and `term-default-bg-color' are
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 64ccde6705e..0fd323a6a2c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-08-29 Martin Blais <blais@furius.ca> (tiny change)
2
3 * progmodes/compile.el (compilation-always-kill): New var.
4 (compilation-start): Use it.
5
12012-08-29 Stefan Monnier <monnier@iro.umontreal.ca> 62012-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * simple.el (read-only-mode): Move from files.el for bootstrapping. 8 * simple.el (read-only-mode): Move from files.el for bootstrapping.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index eb966e8a90d..83f31d5c8d5 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1503,6 +1503,13 @@ Otherwise, construct a buffer name from NAME-OF-MODE."
1503 (compilation-start command nil name-function highlight-regexp))) 1503 (compilation-start command nil name-function highlight-regexp)))
1504(make-obsolete 'compile-internal 'compilation-start "22.1") 1504(make-obsolete 'compile-internal 'compilation-start "22.1")
1505 1505
1506(defcustom compilation-always-kill nil
1507 "If nil, ask to kill compilation. If 't, always kill an
1508incomplete compilation before starting a new one."
1509 :type 'boolean
1510 :version "24.3"
1511 :group 'compilation)
1512
1506;;;###autoload 1513;;;###autoload
1507(defun compilation-start (command &optional mode name-function highlight-regexp) 1514(defun compilation-start (command &optional mode name-function highlight-regexp)
1508 "Run compilation command COMMAND (low level interface). 1515 "Run compilation command COMMAND (low level interface).
@@ -1537,6 +1544,7 @@ Returns the compilation buffer created."
1537 (let ((comp-proc (get-buffer-process (current-buffer)))) 1544 (let ((comp-proc (get-buffer-process (current-buffer))))
1538 (if comp-proc 1545 (if comp-proc
1539 (if (or (not (eq (process-status comp-proc) 'run)) 1546 (if (or (not (eq (process-status comp-proc) 'run))
1547 compilation-always-kill
1540 (yes-or-no-p 1548 (yes-or-no-p
1541 (format "A %s process is running; kill it? " 1549 (format "A %s process is running; kill it? "
1542 name-of-mode))) 1550 name-of-mode)))