Mercurial > emacs
comparison lisp/progmodes/compile.el @ 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 | 65952d6205d6 |
children | c9f46b04dad0 |
comparison
equal
deleted
inserted
replaced
16984:100ef50c2c01 | 16985:b0d8e7c0f906 |
---|---|
76 If FIND-AT-LEAST is non-nil, don't bother parsing after finding that | 76 If FIND-AT-LEAST is non-nil, don't bother parsing after finding that |
77 many new errors. | 77 many new errors. |
78 It should read in the source files which have errors and set | 78 It should read in the source files which have errors and set |
79 `compilation-error-list' to a list with an element for each error message | 79 `compilation-error-list' to a list with an element for each error message |
80 found. See that variable for more info.") | 80 found. See that variable for more info.") |
81 | |
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.") | |
81 | 88 |
82 ;;;###autoload | 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 |
455 (set-window-start outwin (point-min)) | 462 (set-window-start outwin (point-min)) |
456 (setq mode-name name-of-mode) | 463 (setq mode-name name-of-mode) |
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)) |
463 (proc (start-process-shell-command (downcase mode-name) | 472 (proc (start-process-shell-command (downcase mode-name) |
464 outbuf | 473 outbuf |