diff options
author | Juri Linkov <juri@linkov.net> | 2020-12-09 21:16:03 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2020-12-09 21:16:03 +0200 |
commit | 303f0a19cc6b819dd4dc750aa278ca8563d3b64b (patch) | |
tree | 757e3c7404ac9b814b0656b2fce63470f518fce8 /lisp/progmodes/grep.el | |
parent | ef5e0785aee978c55abaecf44ba63867ff3598c4 (diff) | |
download | emacs-303f0a19cc6b819dd4dc750aa278ca8563d3b64b.tar.gz |
Support highlighting of ripgrep output (bug#44983)
* etc/grep.txt: Add ripgrep samples.
* lisp/progmodes/grep.el (grep-match-regexp): Highlight ripgrep matches too.
(grep-regexp-alist): Remove $ to highlight ripgrep binary file matches.
Diffstat (limited to 'lisp/progmodes/grep.el')
-rw-r--r-- | lisp/progmodes/grep.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 7c8acedaf3d..5dc99cc7e93 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -100,7 +100,7 @@ To change the default value, use \\[customize] or call the function :set #'grep-apply-setting :version "22.1") -(defcustom grep-match-regexp "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" +(defcustom grep-match-regexp "\033\\[\\(?:0?1;\\)?31m\\(.*?\\)\033\\[[0-9]*m" "Regular expression matching grep markers to highlight. It matches SGR ANSI escape sequences which are emitted by grep to color its output. This variable is used in `grep-filter'." @@ -412,7 +412,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (- mend beg)))))) nil nil (3 '(face nil display ":"))) - ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) + ("^Binary file \\(.+\\) matches" 1 nil nil 0 1)) "Regexp used to match grep hits. See `compilation-error-regexp-alist' for format details.") |