comparison lisp/progmodes/compile.el @ 99688:0dc2933fc901

(compilation-start-hook): New hook. (compilation-start): Run it on the compilation process.
author Sam Steingold <sds@gnu.org>
date Tue, 18 Nov 2008 14:14:37 +0000
parents d7ac626296a1
children e3d342053d75
comparison
equal deleted inserted replaced
99687:94e37721e194 99688:0dc2933fc901
86 86
87 87
88 ;;;###autoload 88 ;;;###autoload
89 (defcustom compilation-mode-hook nil 89 (defcustom compilation-mode-hook nil
90 "List of hook functions run by `compilation-mode' (see `run-mode-hooks')." 90 "List of hook functions run by `compilation-mode' (see `run-mode-hooks')."
91 :type 'hook
92 :group 'compilation)
93
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').
98 If you use \"omake -P\" and do not want \\[save-buffers-kill-terminal] to ask whether you want
99 the 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)"
91 :type 'hook 102 :type 'hook
92 :group 'compilation) 103 :group 'compilation)
93 104
94 ;;;###autoload 105 ;;;###autoload
95 (defcustom compilation-window-height nil 106 (defcustom compilation-window-height nil
1275 (when compilation-disable-input 1286 (when compilation-disable-input
1276 (condition-case nil 1287 (condition-case nil
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)
1284 ;; Fake modeline display as if `start-process' were run. 1296 ;; Fake modeline display as if `start-process' were run.
1285 (setq mode-line-process 1297 (setq mode-line-process