From: Mattias EngdegÄrd Date: Mon, 22 Nov 2021 18:07:32 +0000 (+0100) Subject: Simplify `gnu` compilation-mode regexp X-Git-Tag: emacs-29.0.90~2852^2~100 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d096e12f447c1c67fe6fb6baa44212781d27ef53;p=emacs.git Simplify `gnu` compilation-mode regexp * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Remove the pattern ostensibly added for Ruby, because at closer inspection it could never have matched anything. This lessens the performance impact of the pattern added for GCC's -fanalyzer, now slightly tweaked. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index c0e16ce3515..2d4070c389c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -346,15 +346,10 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) ;; PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE ;; which is used for non-interactive programs other than ;; compilers (e.g. the "jade:" entry in compilation.txt). - (? (| (regexp "[[:alpha:]][-[:alnum:].]+: ?") - ;; FIXME: This pattern was added for handling messages - ;; from Ruby, but it is unclear whether it is actually - ;; used since the gcc-include rule above seems to cover - ;; it. - (regexp "[ \t]+\\(?:in \\|from\\)") + (? (| (: alpha (+ (in ?. ?- alnum)) ":" (? " ")) ;; Skip indentation generated by tools like GCC's ;; -fanalyzer. - (: (+ space) "|"))) + (: (+ (in " \t")) "|"))) ;; File name group. (group-n 1