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 |
134 |
`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 |
135 |
found. See that variable for more info.") |
found. See that variable for more info.") |
136 |
|
|
137 |
|
(defvar compilation-parse-errors-filename-function nil |
138 |
|
"Function to call to post-process filenames while parsing error messages. |
139 |
|
It takes one arg FILENAME which is the name of a file as found |
140 |
|
in the compilation output, and should return a transformed file name.") |
141 |
|
|
142 |
;;;###autoload |
;;;###autoload |
143 |
(defvar compilation-process-setup-function nil |
(defvar compilation-process-setup-function nil |
144 |
"*Function to call to customize the compilation process. |
"*Function to call to customize the compilation process. |
1950 |
(setq filename |
(setq filename |
1951 |
(concat comint-file-name-prefix filename))) |
(concat comint-file-name-prefix filename))) |
1952 |
|
|
1953 |
|
;; If compilation-parse-errors-filename-function is |
1954 |
|
;; defined, use it to process the filename. |
1955 |
|
(when compilation-parse-errors-filename-function |
1956 |
|
(setq filename |
1957 |
|
(funcall compilation-parse-errors-filename-function |
1958 |
|
filename))) |
1959 |
|
|
1960 |
;; Some compilers (e.g. Sun's java compiler, reportedly) |
;; Some compilers (e.g. Sun's java compiler, reportedly) |
1961 |
;; produce bogus file names like "./bar//foo.c" for file |
;; produce bogus file names like "./bar//foo.c" for file |
1962 |
;; "bar/foo.c"; expand-file-name will collapse these into |
;; "bar/foo.c"; expand-file-name will collapse these into |