summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-02-20 07:50:30 -0800
committerGlenn Morris <rgm@gnu.org>2020-02-20 07:50:30 -0800
commit398afbaf6f31d89b5cb813b75a28b98cf7b1acd2 (patch)
tree587f23019db4d4b1a5b138c741dd2895483cbca8 /lisp/progmodes/compile.el
parent770f76f050376bbd77a3cc8cf44db57cf855a27c (diff)
parent9f0852474810311fd2b26fa3756ab6d816016389 (diff)
downloademacs-398afbaf6f31d89b5cb813b75a28b98cf7b1acd2.tar.gz
Merge from origin/emacs-27
9f08524748 (origin/emacs-27) Fix broken regexps 1d10885763 ; spelling and comment fix 614203bc80 ; make change-history-commit 28399e585e * Makefile.in (PREFERRED_BRANCH): Now emacs-27. 62afbc513a Fix bug when visiting euc-jp-encoded directories a2c4eeeecd Clarify when fixnums are used. 4e5ac4b0c6 Reorder discussion of integer basics f765aad28b Make OMake support slightly less expensive (bug#39595) 39410cfc5a Speed up 'msft' and 'watcom' compilation error regexps 96a269d045 Speed up 'maven' compilation error message regexp efc9d4fe3e Amend c-backward-sws better to handle multiline block comm...
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el30
1 files changed, 21 insertions, 9 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 48ac85a73b7..455f181f501 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -221,7 +221,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
;; considered before EDG.
;; The message may be a "warning", "error", or "fatal error" with
;; an error code, or "see declaration of" without an error code.
- "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) ?\
+ "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)) ?\
: \\(?:see declaration\\|\\(?:warnin\\(g\\)\\|[a-z ]+\\) C[0-9]+:\\)"
2 3 nil (4))
@@ -268,12 +268,24 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
(jikes-file
"^\\(?:Found\\|Issued\\) .* compiling \"\\(.+\\)\":$" 1 nil nil 0)
-
- ;; This used to be pathologically slow on long lines (Bug#3441),
- ;; due to matching filenames via \\(.*?\\). This might be faster.
(maven
;; Maven is a popular free software build tool for Java.
- "\\(\\[WARNING\\] *\\)?\\([^ \n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 2 3 4 (1))
+ ,(rx bol
+ ;; It is unclear whether the initial [type] tag is always present.
+ (? "["
+ (or "ERROR" (group-n 1 "WARNING") (group-n 2 "INFO"))
+ "] ")
+ (group-n 3 ; File
+ (not (any "\n ["))
+ (* (or (not (any "\n :"))
+ (: " " (not (any "\n/-")))
+ (: ":" (not (any "\n ["))))))
+ ":["
+ (group-n 4 (+ digit)) ; Line
+ ","
+ (group-n 5 (+ digit)) ; Column
+ "] ")
+ 3 4 5 (1 . 2))
(jikes-line
"^ *\\([0-9]+\\)\\.[ \t]+.*\n +\\(<-*>\n\\*\\*\\* \\(?:Error\\|Warnin\\(g\\)\\)\\)"
@@ -294,7 +306,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
1 2 3 (4 . 5))
(ruby-Test::Unit
- "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
+ "^ [[ ]?\\([^ (].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
(gmake
;; Set GNU make error messages as INFO level.
@@ -394,7 +406,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
(omake
;; "omake -P" reports "file foo changed"
;; (useful if you do "cvs up" and want to see what has changed)
- "omake: file \\(.*\\) changed" 1 nil nil nil nil
+ "^\\*\\*\\* omake: file \\(.*\\) changed" 1 nil nil nil nil
;; FIXME-omake: This tries to prevent reusing pre-existing markers
;; for subsequent messages, since those messages's line numbers
;; are about another version of the file.
@@ -443,7 +455,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
"^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3)
(watcom
- "^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)): ?\
+ "^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)): ?\
\\(?:\\(Error! E[0-9]+\\)\\|\\(Warning! W[0-9]+\\)\\):"
1 2 nil (4))
@@ -1441,7 +1453,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
((not (memq 'omake compilation-error-regexp-alist)) nil)
((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat)
nil) ;; Not anchored or anchored but already allows empty spaces.
- (t (setq pat (concat "^ *" (substring pat 1)))))
+ (t (setq pat (concat "^\\(?: \\)?" (substring pat 1)))))
(if (consp file) (setq fmt (cdr file) file (car file)))
(if (consp line) (setq end-line (cdr line) line (car line)))