aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii1997-02-09 16:03:50 +0000
committerEli Zaretskii1997-02-09 16:03:50 +0000
commit49683a13761bb8d9436a49875f84e675400cd78a (patch)
tree74f99d4c4c93062e7de6b82e3c8a5e6a4a998eb6
parent8785daf34797355e1e5e1c372965ecf21335d05e (diff)
downloademacs-49683a13761bb8d9436a49875f84e675400cd78a.tar.gz
emacs-49683a13761bb8d9436a49875f84e675400cd78a.zip
* (compilation-process-setup-function): New variable.
(compile-internal): Call compilation-process-setup-function if it is non-nil.
-rw-r--r--lisp/progmodes/compile.el9
1 files changed, 9 insertions, 0 deletions
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
@@ -80,6 +80,13 @@ It should read in the source files which have errors and set
80found. See that variable for more info.") 80found. See that variable for more info.")
81 81
82;;;###autoload 82;;;###autoload
83(defvar compilation-process-setup-function nil
84 "*Function to call to customize the compilation process.
85This functions is called immediately before the compilation process is
86started. It can be used to set any variables or functions that are used
87while processing the output of the compilation process.")
88
89;;;###autoload
83(defvar compilation-buffer-name-function nil 90(defvar compilation-buffer-name-function nil
84 "Function to compute the name of a compilation buffer. 91 "Function to compute the name of a compilation buffer.
85The function receives one argument, the name of the major mode of the 92The function receives one argument, the name of the major mode of the
@@ -457,6 +464,8 @@ Returns the compilation buffer created."
457 (or (eq outwin (selected-window)) 464 (or (eq outwin (selected-window))
458 (set-window-point outwin (point-min))) 465 (set-window-point outwin (point-min)))
459 (compilation-set-window-height outwin) 466 (compilation-set-window-height outwin)
467 (if compilation-process-setup-function
468 (funcall compilation-process-setup-function))
460 ;; Start the compilation. 469 ;; Start the compilation.
461 (if (fboundp 'start-process) 470 (if (fboundp 'start-process)
462 (let* ((process-environment (cons "EMACS=t" process-environment)) 471 (let* ((process-environment (cons "EMACS=t" process-environment))