GNU bug report logs -
#41766
Make it possible to change regexp to identify and highlight grep matches via customization
Previous Next
Reported by: Simon Lang <simon.lang <at> outlook.com>
Date: Mon, 8 Jun 2020 21:32:02 UTC
Severity: normal
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Simon Lang <Simon.lang <at> outlook.com> writes:
> From bc9b736ff20a03e831bc5110283ccf9241127773 Mon Sep 17 00:00:00 2001
> From: Simon Lang <simon.lang <at> outlook.com>
> Date: Mon, 8 Jun 2020 20:47:08 +0100
> Subject: [PATCH] Make regexp used to highlight grep matches customizable
>
> * lisp/progmodes/grep.el
> ---
> lisp/progmodes/grep.el | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
> index 7731be5965..3f0c99f6dc 100644
> --- a/lisp/progmodes/grep.el
> +++ b/lisp/progmodes/grep.el
> @@ -100,6 +100,9 @@ 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"
> + "Regex definition to identify grep markers to highlight matches.")
Nit: How about "Regular expression matching grep markers to highlight."
Every defcustom also needs:
:type 'regexp
:version "28.1"
as well as possibly being announced in etc/NEWS.
I wonder, though: the default value matches some quite obscure codes
which aren't (and maybe shouldn't be) documented, so is a defcustom
really suitable for this? Or would a defvar suffice? (I don't have
strong feelings either way.)
Thanks,
--
Basil
This bug report was last modified 4 years and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.