From d096e12f447c1c67fe6fb6baa44212781d27ef53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Mon, 22 Nov 2021 19:07:32 +0100 Subject: [PATCH] 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. --- lisp/progmodes/compile.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 -- 2.39.5