From 5acf75cec1c2cef383a7c022171f5a1d195c09ca Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 30 Apr 2022 12:47:50 +0200 Subject: [PATCH] Make grep-mode-font-lock-keywords more efficient * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Make the regexp less greedy so that long lines don't take forever to font-lock (bug#44983). --- lisp/progmodes/grep.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 17905dec2eb..7620536b4b6 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -456,7 +456,7 @@ buffer `default-directory'." (defvar grep-mode-font-lock-keywords '(;; Command output lines. - (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" + (": \\(.\\{,200\\}\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" 1 grep-error-face) ;; remove match from grep-regexp-alist before fontifying ("^Grep[/a-zA-Z]* started.*" -- 2.39.2