]> git.eshelyaron.com Git - emacs.git/commitdiff
Make grep-mode-font-lock-keywords more efficient
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Apr 2022 10:47:50 +0000 (12:47 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Apr 2022 10:57:20 +0000 (12:57 +0200)
* 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

index 17905dec2eb0e15d570990cc9cd8bd2357207a72..7620536b4b61cecbff8bd4655c22d1224302efb1 100644 (file)
@@ -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.*"