diff options
| author | Paul Smith | 2019-10-05 12:29:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-10-05 12:33:23 -0700 |
| commit | e72e4990f99c5d56502d304f448a410bb17d12d7 (patch) | |
| tree | 980dd81c634c24535d949b4cd9fc2741e20aaf56 | |
| parent | 4f2de56830ea25d812b05c954abd0600a012f9ef (diff) | |
| download | emacs-e72e4990f99c5d56502d304f448a410bb17d12d7.tar.gz emacs-e72e4990f99c5d56502d304f448a410bb17d12d7.zip | |
Support GNU make error messages in compile mode.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Match GNU make error messages.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Test GNU make error message matching.
(compile-test-error-regexps): Update count of infos found.
| -rw-r--r-- | lisp/progmodes/compile.el | 6 | ||||
| -rw-r--r-- | test/lisp/progmodes/compile-tests.el | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 83efb3e0295..50370a4f3ac 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -274,6 +274,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 274 | (ruby-Test::Unit | 274 | (ruby-Test::Unit |
| 275 | "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2) | 275 | "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2) |
| 276 | 276 | ||
| 277 | (gmake | ||
| 278 | ;; Set GNU make error messages as INFO level. | ||
| 279 | ;; It starts with the name of the make program which is variable, | ||
| 280 | ;; so don't try to match it. | ||
| 281 | ": \\*\\*\\* \\[\\(\\(.+?\\):\\([0-9]+\\): .+\\)\\]" 2 3 nil 0 1) | ||
| 282 | |||
| 277 | (gnu | 283 | (gnu |
| 278 | ;; The first line matches the program name for | 284 | ;; The first line matches the program name for |
| 279 | 285 | ||
diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index 8e59a5401bb..08a369e7b54 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el | |||
| @@ -180,6 +180,12 @@ | |||
| 180 | 1 0 31 "/usr/include/c++/3.3/backward/iostream.h") | 180 | 1 0 31 "/usr/include/c++/3.3/backward/iostream.h") |
| 181 | (" from test_clt.cc:1:" | 181 | (" from test_clt.cc:1:" |
| 182 | 1 nil 1 "test_clt.cc") | 182 | 1 nil 1 "test_clt.cc") |
| 183 | ;; gmake | ||
| 184 | ("make: *** [Makefile:20: all] Error 2" 12 nil 20 "Makefile" 0) | ||
| 185 | ("make[4]: *** [sub/make.mk:19: all] Error 127" 15 nil 19 "sub/make.mk" 0) | ||
| 186 | ("gmake[4]: *** [sub/make.mk:19: all] Error 2" 16 nil 19 "sub/make.mk" 0) | ||
| 187 | ("gmake-4.3[4]: *** [make.mk:1119: all] Error 2" 20 nil 1119 "make.mk" 0) | ||
| 188 | ("Make-4.3: *** [make.INC:1119: dir/all] Error 2" 16 nil 1119 "make.INC" 0) | ||
| 183 | ;; gnu | 189 | ;; gnu |
| 184 | ("foo.c:8: message" 1 nil 8 "foo.c") | 190 | ("foo.c:8: message" 1 nil 8 "foo.c") |
| 185 | ("../foo.c:8: W: message" 1 nil 8 "../foo.c") | 191 | ("../foo.c:8: W: message" 1 nil 8 "../foo.c") |
| @@ -409,7 +415,7 @@ The test data is in `compile-tests--test-regexps-data'." | |||
| 409 | (mapc #'compile--test-error-line compile-tests--test-regexps-data) | 415 | (mapc #'compile--test-error-line compile-tests--test-regexps-data) |
| 410 | (should (eq compilation-num-errors-found 87)) | 416 | (should (eq compilation-num-errors-found 87)) |
| 411 | (should (eq compilation-num-warnings-found 32)) | 417 | (should (eq compilation-num-warnings-found 32)) |
| 412 | (should (eq compilation-num-infos-found 21))))) | 418 | (should (eq compilation-num-infos-found 26))))) |
| 413 | 419 | ||
| 414 | (ert-deftest compile-test-grep-regexps () | 420 | (ert-deftest compile-test-grep-regexps () |
| 415 | "Test the `grep-regexp-alist' regexps. | 421 | "Test the `grep-regexp-alist' regexps. |