From 49683a13761bb8d9436a49875f84e675400cd78a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 9 Feb 1997 16:03:50 +0000 Subject: [PATCH] * (compilation-process-setup-function): New variable. (compile-internal): Call compilation-process-setup-function if it is non-nil. --- lisp/progmodes/compile.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 046ce9631bf..a95d260daa6 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -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)) -- 2.39.5