1 |
;;; compile.el --- run compiler as inferior of Emacs, parse error messages |
;;; compile.el --- run compiler as inferior of Emacs, parse error messages |
2 |
|
|
3 |
;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001 Free Software Foundation, Inc. |
;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Roland McGrath <roland@gnu.org> |
;; Author: Roland McGrath <roland@gnu.org> |
7 |
;; Maintainer: FSF |
;; Maintainer: FSF |
115 |
`compilation-error-list' to a list with an element for each error message |
`compilation-error-list' to a list with an element for each error message |
116 |
found. See that variable for more info.") |
found. See that variable for more info.") |
117 |
|
|
118 |
|
(defvar compilation-parse-errors-filename-function nil |
119 |
|
"Function to call to post-process filenames while parsing error messages. |
120 |
|
It takes one arg FILENAME which is the name of a file as found |
121 |
|
in the compilation output, and should return a transformed file name.") |
122 |
|
|
123 |
;;;###autoload |
;;;###autoload |
124 |
(defvar compilation-process-setup-function nil |
(defvar compilation-process-setup-function nil |
125 |
"*Function to call to customize the compilation process. |
"*Function to call to customize the compilation process. |
1883 |
(setq filename |
(setq filename |
1884 |
(concat comint-file-name-prefix filename))) |
(concat comint-file-name-prefix filename))) |
1885 |
|
|
1886 |
|
;; If compilation-parse-errors-filename-function is |
1887 |
|
;; defined, use it to process the filename. |
1888 |
|
(when compilation-parse-errors-filename-function |
1889 |
|
(setq filename |
1890 |
|
(funcall compilation-parse-errors-filename-function |
1891 |
|
filename))) |
1892 |
|
|
1893 |
;; Some compilers (e.g. Sun's java compiler, reportedly) |
;; Some compilers (e.g. Sun's java compiler, reportedly) |
1894 |
;; produce bogus file names like "./bar//foo.c" for file |
;; produce bogus file names like "./bar//foo.c" for file |
1895 |
;; "bar/foo.c"; expand-file-name will collapse these into |
;; "bar/foo.c"; expand-file-name will collapse these into |