comparison man/search.texi @ 59428:856e8ee31fcb

(Query Replace): Mention faces query-replace and lazy-highlight. (Incremental Search): Update isearch highlighting info.
author Richard M. Stallman <rms@gnu.org>
date Sun, 09 Jan 2005 01:57:30 +0000
parents cb59b8d0f534
children c218b809efea cb67264d6096
comparison
equal deleted inserted replaced
59427:847ceead54c3 59428:856e8ee31fcb
217 there. In Transient Mark mode, incremental search sets the mark without 217 there. In Transient Mark mode, incremental search sets the mark without
218 activating it, and does so only if the mark is not already active. 218 activating it, and does so only if the mark is not already active.
219 219
220 @kbd{M-%} typed in incremental search invokes @code{query-replace} 220 @kbd{M-%} typed in incremental search invokes @code{query-replace}
221 or @code{query-replace-regexp} (depending on search mode) with the 221 or @code{query-replace-regexp} (depending on search mode) with the
222 current search string used as the string to replace. 222 current search string used as the string to replace. @xref{Query
223 Replace}.
223 224
224 @cindex lazy search highlighting 225 @cindex lazy search highlighting
225 @vindex isearch-lazy-highlight 226 @vindex isearch-lazy-highlight
226 When you pause for a little while during incremental search, it 227 When you pause for a little while during incremental search, it
227 highlights all other possible matches for the search string. This 228 highlights all other possible matches for the search string. This
229 or @kbd{C-r} to repeat the search. The short delay before highlighting 230 or @kbd{C-r} to repeat the search. The short delay before highlighting
230 other matches helps indicate which match is the current one. 231 other matches helps indicate which match is the current one.
231 If you don't like this feature, you can turn it off by setting 232 If you don't like this feature, you can turn it off by setting
232 @code{isearch-lazy-highlight} to @code{nil}. 233 @code{isearch-lazy-highlight} to @code{nil}.
233 234
234 @vindex isearch-lazy-highlight-face
235 @cindex faces for highlighting search matches 235 @cindex faces for highlighting search matches
236 You can control how this highlighting looks by customizing the faces 236 You can control how this highlighting looks by customizing the faces
237 @code{isearch} (used for the current match) and 237 @code{isearch} (used for the current match) and @code{lazy-highlight}
238 @code{isearch-lazy-highlight-face} (for all the other matches). 238 (for all the other matches). The latter is also used for other matches
239 inside @code{query-replace}.
239 240
240 @vindex isearch-mode-map 241 @vindex isearch-mode-map
241 To customize the special characters that incremental search understands, 242 To customize the special characters that incremental search understands,
242 alter their bindings in the keymap @code{isearch-mode-map}. For a list 243 alter their bindings in the keymap @code{isearch-mode-map}. For a list
243 of bindings, look at the documentation of @code{isearch-mode} with 244 of bindings, look at the documentation of @code{isearch-mode} with
1151 word-delimiter characters. 1152 word-delimiter characters.
1152 1153
1153 @kindex C-M-% 1154 @kindex C-M-%
1154 @findex query-replace-regexp 1155 @findex query-replace-regexp
1155 @kbd{C-M-%} performs regexp search and replace (@code{query-replace-regexp}). 1156 @kbd{C-M-%} performs regexp search and replace (@code{query-replace-regexp}).
1157 It works like @code{replace-regexp} except that it queries
1158 like @code{query-replace}.
1159
1160 @cindex faces for highlighting query replace
1161 These commands highlight the current match using the face
1162 @code{query-replace}. They highlight other matches using
1163 @code{lazy-highlight} just like incremental search (@pxref{Incremental
1164 Search}).
1156 1165
1157 The characters you can type when you are shown a match for the string 1166 The characters you can type when you are shown a match for the string
1158 or regexp are: 1167 or regexp are:
1159 1168
1160 @ignore @c Not worth it. 1169 @ignore @c Not worth it.