From: Lars Ingebrigtsen Date: Sat, 30 Apr 2022 10:47:50 +0000 (+0200) Subject: Make grep-mode-font-lock-keywords more efficient X-Git-Tag: emacs-29.0.90~1931^2~193 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5acf75cec1c2cef383a7c022171f5a1d195c09ca;p=emacs.git 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). --- 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.*"