diff options
author | Juri Linkov <juri@linkov.net> | 2020-10-14 11:56:23 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2020-10-14 11:56:23 +0300 |
commit | 4bf9bb56b56b4acacd5d9430a19db32291bd078b (patch) | |
tree | 79dcab4d02f8e52fc5c0f618c80e62e416c4fc92 /doc/emacs/search.texi | |
parent | b13e0c1501a21e942692718194c634e01a13928a (diff) | |
download | emacs-4bf9bb56b56b4acacd5d9430a19db32291bd078b.tar.gz |
Highlight regexp sub-expressions in query-replace
* lisp/replace.el (query-replace-highlight-submatches): New defcustom.
(replace-submatches-overlays): New variable.
(replace-highlight): Use query-replace-highlight-submatches.
(replace-dehighlight): Use query-replace-highlight-submatches.
* doc/emacs/search.texi (Query Replace):
Add documentation for query-replace-highlight-submatches.
Suggested by Drew Adams <drew.adams@oracle.com> in bug#43702.
Diffstat (limited to 'doc/emacs/search.texi')
-rw-r--r-- | doc/emacs/search.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 2169a4120be..91b433f1738 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1662,6 +1662,7 @@ reused. @cindex @code{query-replace} face @cindex @code{lazy-highlight} face, in replace @vindex query-replace-highlight +@vindex query-replace-highlight-submatches @vindex query-replace-lazy-highlight @vindex query-replace-show-replacement These commands highlight the current match using the face @@ -1674,6 +1675,10 @@ other matches using @code{lazy-highlight} just like incremental search string for the current match in the minibuffer. If you want to keep special sequences @samp{\&} and @samp{\@var{n}} unexpanded, customize @code{query-replace-show-replacement} variable. +Like @code{search-highlight-submatches} highlights subexpressions in +incremental search (@pxref{Search Customizations}), the variable +@code{query-replace-highlight-submatches} defines whether to highlight +subexpressions in the regexp replacement commands. @vindex query-replace-skip-read-only The variable @code{query-replace-skip-read-only}, if set |