diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-21 15:56:55 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-21 15:57:00 +0200 |
commit | d2b754ec1a947a4d98fa6521ad9263bdc45900e5 (patch) | |
tree | 379dd7c94063a8480b7829a3974b8dc1dc856148 /doc/emacs/search.texi | |
parent | ebad35e4d99340af1bad3702063f029a21e188bc (diff) | |
download | emacs-d2b754ec1a947a4d98fa6521ad9263bdc45900e5.tar.gz |
Add more isearch submatch faces
* doc/emacs/search.texi (Search Customizations): Adjust
documentation.
* lisp/isearch.el (search-highlight-submatches): Be a boolean.
(isearch-group-{6-9}): New faces.
(isearch-highlight): Use the variable as a boolean.
Diffstat (limited to 'doc/emacs/search.texi')
-rw-r--r-- | doc/emacs/search.texi | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 508debd13c8..d44d7bee2ac 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1981,15 +1981,13 @@ setting the variable @code{search-highlight} to @code{nil}. When searching for regular expressions (with @kbd{C-M-s}, for instance), subexpressions receive special highlighting depending on the @code{search-highlight-submatches} variable. If this variable's -value is zero, no special highlighting is done, but if the value is a -positive integer @var{n}, the strings matching the first @var{n} -@samp{\( @dots{} \)} constructs (a.k.a.@: ``subexpressions'') in the -regular expression will be highlighted with distinct faces, named -@code{isearch-group-@var{n}}. For instance, when searching for -@samp{foo-\([0-9]+\)}, the part matched by @samp{[0-9]+} will be -highlighted with the @code{isearch-group-1} face if -@code{search-highlight-submatches} is greater or equal to 1. The -default value of @code{search-highlight-submatches} is 5. +value is @code{nil}, no special highlighting is done, but if the value +is non-@code{nil}, text that matches @samp{\( @dots{} \)} constructs +(a.k.a.@: ``subexpressions'') in the regular expression will be +highlighted with distinct faces, named @code{isearch-group-@var{n}}. +For instance, when searching for @samp{foo-\([0-9]+\)}, the part +matched by @samp{[0-9]+} will be highlighted with the +@code{isearch-group-1} face. @cindex lazy highlighting customizations @vindex isearch-lazy-highlight |