commit 0a5e9cf2622a0282d56cc150af5a94b5d5fd71be (HEAD, refs/remotes/origin/master) Author: Dmitry Gutov Date: Mon Oct 5 03:02:10 2020 +0300 Mention two more functions in the commentary * lisp/progmodes/project.el: Mention two more functions in the commentary (bug#43595). diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 8c550b5768..40a804b00e 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -66,6 +66,9 @@ ;; `project-combine-directories' and `project-subtract-directories', ;; mainly for use in the abovementioned generics' implementations. ;; +;; `project-known-project-roots' and `project-remember-project' to +;; interact with the "known projects" list. +;; ;; Commands: ;; ;; `project-prefix-map' contains the full list of commands defined in commit 7be18bbfe1f51f2828e868900b83b013faeb6db6 Author: Eli Zaretskii Date: Wed Oct 7 12:12:06 2020 +0300 Improve documentation of 'isearch-group-N' faces * etc/NEWS: * doc/emacs/search.texi (Search Customizations): Improve and clarify the wording of the 'isearch-group-N' faces description. * lisp/isearch.el (search-highlight-submatches): Doc fix. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index d25e35635e..2169a4120b 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1984,13 +1984,21 @@ the @code{search-highlight-submatches} variable. If this variable's 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-1} -and @code{isearch-group-2}. 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. When there are -more matches than faces, then faces are recycled from beginning, -so the @code{isearch-group-1} face is used for the third match again. -You can define more faces using the same numbering scheme. +highlighted with distinct faces. By default, two distinct faces are +defined, named @code{isearch-group-1} and @code{isearch-group-2}. +With these two faces, odd-numbered subexpressions will be highlighted +using the @code{isearch-group-1} face and even-numbered subexpressions +will be highlighted using the @code{isearch-group-2} face. For +instance, when searching for @samp{foo-\([0-9]+\)\([a-z]+\)}, the part +matched by @samp{[0-9]+} will be highlighted with the +@code{isearch-group-1} face, and the part matched by @samp{[a-z]+} +will be highlighted using @code{isearch-group-2}. If you define +additional faces using the same numbering scheme, i.e.@: +@code{isearch-group-3}, @code{isearch-group-4}, @dots{}, then the face +@code{isearch-group-@var{M}} will be used to highlight the @var{M}'th, +@code{@var{N}+@var{M}}'th, @code{2@var{N}+@var{M}}'th, @dots{} +subexpressions, where @var{N} is the total number of faces of the form +@code{isearch-group-@var{M}}. @cindex lazy highlighting customizations @vindex isearch-lazy-highlight diff --git a/etc/NEWS b/etc/NEWS index 9d7b6e3115..63a740cf64 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1108,7 +1108,10 @@ keystrokes. *** Interactive regular expression search now uses faces for sub-groups. E.g., 'C-M-s foo-\([0-9]+\)' will now use the 'isearch-group-1' face on the part of the regexp that matches the sub-expression "[0-9]+". -By default, there are two group faces, but you can define more. +By default, there are two faces for sub-group highlighting, but you +can define more faces whose names are of the form 'isearch-group-N', +where N are successive numbers above 2. + This is controlled by the 'search-highlight-submatches' user option. This feature is available only on terminals that have enough colors to distinguish between sub-expression highlighting. diff --git a/lisp/isearch.el b/lisp/isearch.el index 08d4be3ca8..f39de79303 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -272,10 +272,11 @@ are `word-search-regexp' \(`\\[isearch-toggle-word]'), `isearch-symbol-regexp' (defcustom search-highlight-submatches t "Whether to highlight regexp subexpressions of the current regexp match. The faces used to do the highlights are named `isearch-group-1', -`isearch-group-2'. When there are more matches than faces, then faces are -recycled from beginning, so the `isearch-group-1' face is used for the -third match again. If you want to use more distinctive colors, you have to -define more of these faces using the same numbering scheme." +`isearch-group-2', etc. (By default, only these 2 are defined.) +When there are more matches than faces, then faces are reused from the +beginning, in a cyclical manner, so the `isearch-group-1' face is +isreused for the third match. If you want to use more distinctive colors, +you can define more of these faces using the same numbering scheme." :type 'boolean :version "28.1")