summaryrefslogtreecommitdiff
path: root/lisp/progmodes/grep.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-04-30 12:47:50 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-30 12:57:20 +0200
commit5acf75cec1c2cef383a7c022171f5a1d195c09ca (patch)
treedb8a9889cf48e5e1fe04868df013ed05c6326dfe /lisp/progmodes/grep.el
parentaab5d7b3f3bb6fb82924aaabdfdd6e2a79ad3141 (diff)
downloademacs-5acf75cec1c2cef383a7c022171f5a1d195c09ca.tar.gz
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).
Diffstat (limited to 'lisp/progmodes/grep.el')
-rw-r--r--lisp/progmodes/grep.el2
1 files changed, 1 insertions, 1 deletions
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.*"