diff options
| author | Eli Zaretskii | 1997-02-09 16:03:50 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 1997-02-09 16:03:50 +0000 |
| commit | 49683a13761bb8d9436a49875f84e675400cd78a (patch) | |
| tree | 74f99d4c4c93062e7de6b82e3c8a5e6a4a998eb6 | |
| parent | 8785daf34797355e1e5e1c372965ecf21335d05e (diff) | |
| download | emacs-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.el | 9 |
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 | |||
| 80 | found. See that variable for more info.") | 80 | found. 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. | ||
| 85 | This functions is called immediately before the compilation process is | ||
| 86 | started. It can be used to set any variables or functions that are used | ||
| 87 | while 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. |
| 85 | The function receives one argument, the name of the major mode of the | 92 | The 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)) |