diff options
| author | Gerd Moellmann | 2001-10-25 07:47:48 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-25 07:47:48 +0000 |
| commit | e335e1949df8da61ad493b53242a3e230b835ae7 (patch) | |
| tree | 11caf2cd59cd8e799361178d54ae4c4c3836d708 | |
| parent | 5a2e524f260fac4c59ba693d500b34602f04cdcb (diff) | |
| download | emacs-e335e1949df8da61ad493b53242a3e230b835ae7.tar.gz emacs-e335e1949df8da61ad493b53242a3e230b835ae7.zip | |
(compilation-parse-errors-filename-function):
New variable.
(compilation-parse-errors): Use it.
| -rw-r--r-- | lisp/progmodes/compile.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f520d860068..34dc39370ca 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages | 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Roland McGrath <roland@gnu.org> | 6 | ;; Author: Roland McGrath <roland@gnu.org> |
| 6 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -133,6 +134,11 @@ It should read in the source files which have errors and set | |||
| 133 | `compilation-error-list' to a list with an element for each error message | 134 | `compilation-error-list' to a list with an element for each error message |
| 134 | found. See that variable for more info.") | 135 | found. See that variable for more info.") |
| 135 | 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 | |||
| 136 | ;;;###autoload | 142 | ;;;###autoload |
| 137 | (defvar compilation-process-setup-function nil | 143 | (defvar compilation-process-setup-function nil |
| 138 | "*Function to call to customize the compilation process. | 144 | "*Function to call to customize the compilation process. |
| @@ -1944,6 +1950,13 @@ An error message with no file name and no file name has been seen earlier")) | |||
| 1944 | (setq filename | 1950 | (setq filename |
| 1945 | (concat comint-file-name-prefix filename))) | 1951 | (concat comint-file-name-prefix filename))) |
| 1946 | 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 | |||
| 1947 | ;; Some compilers (e.g. Sun's java compiler, reportedly) | 1960 | ;; Some compilers (e.g. Sun's java compiler, reportedly) |
| 1948 | ;; produce bogus file names like "./bar//foo.c" for file | 1961 | ;; produce bogus file names like "./bar//foo.c" for file |
| 1949 | ;; "bar/foo.c"; expand-file-name will collapse these into | 1962 | ;; "bar/foo.c"; expand-file-name will collapse these into |