From 1c6a71cd1db5b589ff9fc5f4fe76e9357b7bedbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= Date: Sun, 5 Feb 2023 21:34:08 +0100 Subject: [PATCH] Optimize compilation-mode expressions for TypeScript - lisp/progmodes/compile.el: remove unneeded and expensive checks. --- lisp/progmodes/compile.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1e57d0b7bb..7700e5f7b1 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -654,18 +654,16 @@ compilation-error-regexp-alist-alist ;; greeter.ts(30,12): error TS2339: Property 'foo' does not exist. (typescript-tsc-plain ,(concat - "^[[:blank:]]*" - "\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)):[[:blank:]]+" - "error [[:alnum:]]+: [^\r\n]+$") + "\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)): " + "error [A-Z0-9]+: [^\n]+$") 1 2 3 2) ;; Typescript compilation after tsc version 2.7, "pretty" format: ;; src/resources/document.ts:140:22 - error TS2362: something. (typescript-tsc-pretty ,(concat - "^[[:blank:]]*" - "\\([^(\r\n)]+\\):\\([0-9]+\\):\\([0-9]+\\) - [[:blank:]]*" - "error [[:alnum:]]+: [^\r\n]+$") + "\\([^(\r\n)]+\\):\\([0-9]+\\):\\([0-9]+\\) - " + "error [A-Z0-9]+: [^\n]+$") 1 2 3 2) )) "Alist of values for `compilation-error-regexp-alist'.") -- 2.39.1