changeset 16985:b0d8e7c0f906

* (compilation-process-setup-function): New variable. (compile-internal): Call compilation-process-setup-function if it is non-nil.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 09 Feb 1997 16:03:50 +0000
parents 100ef50c2c01
children dc0cd1c70c87
files lisp/progmodes/compile.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Sun Feb 09 15:57:11 1997 +0000
+++ b/lisp/progmodes/compile.el	Sun Feb 09 16:03:50 1997 +0000
@@ -80,6 +80,13 @@
 found.  See that variable for more info.")
 
 ;;;###autoload
+(defvar compilation-process-setup-function nil
+  "*Function to call to customize the compilation process.
+This functions is called immediately before the compilation process is
+started.  It can be used to set any variables or functions that are used
+while processing the output of the compilation process.")
+
+;;;###autoload
 (defvar compilation-buffer-name-function nil
   "Function to compute the name of a compilation buffer.
 The function receives one argument, the name of the major mode of the
@@ -457,6 +464,8 @@
 	(or (eq outwin (selected-window))
 	    (set-window-point outwin (point-min)))
 	(compilation-set-window-height outwin)
+	(if compilation-process-setup-function
+	    (funcall compilation-process-setup-function))
 	;; Start the compilation.
 	(if (fboundp 'start-process)
 	    (let* ((process-environment (cons "EMACS=t" process-environment))