aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2008-11-18 14:14:37 +0000
committerSam Steingold2008-11-18 14:14:37 +0000
commitdd93e6daf75d71797fa6f03719d5890d269b2cb4 (patch)
treeca2c18d5536e524c48f47ca9d29b4249c2f7fd6a
parent8999d86f5bdacbddea5b2533172b3b785b02c9c6 (diff)
downloademacs-dd93e6daf75d71797fa6f03719d5890d269b2cb4.tar.gz
emacs-dd93e6daf75d71797fa6f03719d5890d269b2cb4.zip
(compilation-start-hook): New hook.
(compilation-start): Run it on the compilation process.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/compile.el14
2 files changed, 18 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4010ba0e9f7..0fca95bea2d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-11-18 Sam Steingold <sds@gnu.org>
2
3 * progmodes/compile.el (compilation-start-hook): New hook.
4 (compilation-start): Run it on the compilation process.
5
12008-11-18 Juanma Barranquero <lekktu@gmail.com> 62008-11-18 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * international/mule-cmds.el (update-leim-list-file): Simplify. 8 * international/mule-cmds.el (update-leim-list-file): Simplify.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f29c93f5ffa..9993f1197c3 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -92,6 +92,17 @@
92 :group 'compilation) 92 :group 'compilation)
93 93
94;;;###autoload 94;;;###autoload
95(defcustom compilation-start-hook nil
96 "List of hook functions run by `compilation-start' on the compilation process.
97\(See `run-hook-with-args').
98If you use \"omake -P\" and do not want \\[save-buffers-kill-terminal] to ask whether you want
99the compilation to be killed, you can use this hook:
100 (add-hook 'compilation-start-hook
101 (lambda (process) (set-process-query-on-exit-flag process nil)) nil t)"
102 :type 'hook
103 :group 'compilation)
104
105;;;###autoload
95(defcustom compilation-window-height nil 106(defcustom compilation-window-height nil
96 "Number of lines in a compilation window. If nil, use Emacs default." 107 "Number of lines in a compilation window. If nil, use Emacs default."
97 :type '(choice (const :tag "Default" nil) 108 :type '(choice (const :tag "Default" nil)
@@ -1277,7 +1288,8 @@ Returns the compilation buffer created."
1277 (process-send-eof proc) 1288 (process-send-eof proc)
1278 ;; The process may have exited already. 1289 ;; The process may have exited already.
1279 (error nil))) 1290 (error nil)))
1280 (setq compilation-in-progress 1291 (run-hook-with-args 'compilation-start-hook proc)
1292 (setq compilation-in-progress
1281 (cons proc compilation-in-progress))) 1293 (cons proc compilation-in-progress)))
1282 ;; No asynchronous processes available. 1294 ;; No asynchronous processes available.
1283 (message "Executing `%s'..." command) 1295 (message "Executing `%s'..." command)