aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorSam Steingold <[email protected]>2008-11-18 14:14:37 +0000
committerSam Steingold <[email protected]>2008-11-18 14:14:37 +0000
commitdd93e6daf75d71797fa6f03719d5890d269b2cb4 (patch)
treeca2c18d5536e524c48f47ca9d29b4249c2f7fd6a /lisp/progmodes
parent8999d86f5bdacbddea5b2533172b3b785b02c9c6 (diff)
(compilation-start-hook): New hook.
(compilation-start): Run it on the compilation process.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f29c93f5ff..9993f1197c 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -92,6 +92,17 @@
:group 'compilation)
;;;###autoload
+(defcustom compilation-start-hook nil
+ "List of hook functions run by `compilation-start' on the compilation process.
+\(See `run-hook-with-args').
+If you use \"omake -P\" and do not want \\[save-buffers-kill-terminal] to ask whether you want
+the compilation to be killed, you can use this hook:
+ (add-hook 'compilation-start-hook
+ (lambda (process) (set-process-query-on-exit-flag process nil)) nil t)"
+ :type 'hook
+ :group 'compilation)
+
+;;;###autoload
(defcustom compilation-window-height nil
"Number of lines in a compilation window. If nil, use Emacs default."
:type '(choice (const :tag "Default" nil)
@@ -1277,7 +1288,8 @@ Returns the compilation buffer created."
(process-send-eof proc)
;; The process may have exited already.
(error nil)))
- (setq compilation-in-progress
+ (run-hook-with-args 'compilation-start-hook proc)
+ (setq compilation-in-progress
(cons proc compilation-in-progress)))
;; No asynchronous processes available.
(message "Executing `%s'..." command)