Mercurial > emacs
comparison man/search.texi @ 90813:e6fdae9180d4
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 698-710)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 216)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 24 Apr 2007 21:56:25 +0000 |
parents | 95d0cdf160ea 1e02a80ad090 |
children |
comparison
equal
deleted
inserted
replaced
90812:6137cc8ddf90 | 90813:e6fdae9180d4 |
---|---|
1000 C-@key{SPC}} to move back there. | 1000 C-@key{SPC}} to move back there. |
1001 | 1001 |
1002 A numeric argument restricts replacement to matches that are surrounded | 1002 A numeric argument restricts replacement to matches that are surrounded |
1003 by word boundaries. The argument's value doesn't matter. | 1003 by word boundaries. The argument's value doesn't matter. |
1004 | 1004 |
1005 @xref{Replacement and Case}, for details about case-sensitivity in | |
1006 replace commands. | |
1007 | |
1005 What if you want to exchange @samp{x} and @samp{y}: replace every @samp{x} with a @samp{y} and vice versa? You can do it this way: | 1008 What if you want to exchange @samp{x} and @samp{y}: replace every @samp{x} with a @samp{y} and vice versa? You can do it this way: |
1006 | 1009 |
1007 @example | 1010 @example |
1008 M-x replace-string @key{RET} x @key{RET} @@TEMP@@ @key{RET} | 1011 M-x replace-string @key{RET} x @key{RET} @@TEMP@@ @key{RET} |
1009 M-< M-x replace-string @key{RET} y @key{RET} x @key{RET} | 1012 M-< M-x replace-string @key{RET} y @key{RET} x @key{RET} |
1153 @code{replace-string}. Instead, use @kbd{M-%} (@code{query-replace}). | 1156 @code{replace-string}. Instead, use @kbd{M-%} (@code{query-replace}). |
1154 This command finds occurrences of @samp{foo} one by one, displays each | 1157 This command finds occurrences of @samp{foo} one by one, displays each |
1155 occurrence and asks you whether to replace it. Aside from querying, | 1158 occurrence and asks you whether to replace it. Aside from querying, |
1156 @code{query-replace} works just like @code{replace-string}. It | 1159 @code{query-replace} works just like @code{replace-string}. It |
1157 preserves case, like @code{replace-string}, provided | 1160 preserves case, like @code{replace-string}, provided |
1158 @code{case-replace} is non-@code{nil}, as it normally is. A numeric | 1161 @code{case-replace} is non-@code{nil}, as it normally is |
1159 argument means consider only occurrences that are bounded by | 1162 (@pxref{Replacement and Case}). A numeric argument means consider |
1160 word-delimiter characters. | 1163 only occurrences that are bounded by word-delimiter characters. |
1161 | 1164 |
1162 @kindex C-M-% | 1165 @kindex C-M-% |
1163 @findex query-replace-regexp | 1166 @findex query-replace-regexp |
1164 @kbd{C-M-%} performs regexp search and replace (@code{query-replace-regexp}). | 1167 @kbd{C-M-%} performs regexp search and replace (@code{query-replace-regexp}). |
1165 It works like @code{replace-regexp} except that it queries | 1168 It works like @code{replace-regexp} except that it queries |