Mercurial > emacs
changeset 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 | 94e37721e194 |
children | 01d86c5bc5d6 |
files | lisp/ChangeLog lisp/progmodes/compile.el |
diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Nov 18 07:07:46 2008 +0000 +++ b/lisp/ChangeLog Tue Nov 18 14:14:37 2008 +0000 @@ -1,3 +1,8 @@ +2008-11-18 Sam Steingold <sds@gnu.org> + + * progmodes/compile.el (compilation-start-hook): New hook. + (compilation-start): Run it on the compilation process. + 2008-11-18 Juanma Barranquero <lekktu@gmail.com> * international/mule-cmds.el (update-leim-list-file): Simplify.
--- a/lisp/progmodes/compile.el Tue Nov 18 07:07:46 2008 +0000 +++ b/lisp/progmodes/compile.el Tue Nov 18 14:14:37 2008 +0000 @@ -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 @@ (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)