* (compilation-process-setup-function): New variable.
authorEli Zaretskii <eliz@gnu.org>
Sun, 9 Feb 1997 16:03:50 +0000 (16:03 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 9 Feb 1997 16:03:50 +0000 (16:03 +0000)
(compile-internal): Call compilation-process-setup-function if
it is non-nil.

lisp/progmodes/compile.el

index 046ce96..a95d260 100644 (file)
@@ -79,6 +79,13 @@ It should read in the source files which have errors and set
 `compilation-error-list' to a list with an element for each error message
 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.
@@ -457,6 +464,8 @@ Returns the compilation buffer created."
        (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))