aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/searching.texi26
2 files changed, 16 insertions, 14 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index db545f8ec91..b813ac6bb1c 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12012-09-22 Chong Yidong <cyd@gnu.org>
2
3 * searching.texi (Replacing Match): Minor clarification.
4
12012-09-22 Eli Zaretskii <eliz@gnu.org> 52012-09-22 Eli Zaretskii <eliz@gnu.org>
2 6
3 * edebug.texi (Instrumenting): Improve indexing. 7 * edebug.texi (Instrumenting): Improve indexing.
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index edd1d30e28d..56c96363e81 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1278,20 +1278,18 @@ search. It works by means of the match data.
1278 1278
1279@cindex case in replacements 1279@cindex case in replacements
1280@defun replace-match replacement &optional fixedcase literal string subexp 1280@defun replace-match replacement &optional fixedcase literal string subexp
1281This function replaces the text in the buffer (or in @var{string}) that 1281This function performs a replacement operation on a buffer or string.
1282was matched by the last search. It replaces that text with 1282
1283@var{replacement}. 1283If you did the last search in a buffer, you should omit the
1284 1284@var{string} argument or specify @code{nil} for it, and make sure that
1285If you did the last search in a buffer, you should specify @code{nil} 1285the current buffer is the one in which you performed the last search.
1286for @var{string} and make sure that the current buffer when you call 1286Then this function edits the buffer, replacing the matched text with
1287@code{replace-match} is the one in which you did the searching or 1287@var{replacement}. It leaves point at the end of the replacement
1288matching. Then @code{replace-match} does the replacement by editing 1288text, and returns @code{t}.
1289the buffer; it leaves point at the end of the replacement text, and 1289
1290returns @code{t}. 1290If you performed the last search on a string, pass the same string as
1291 1291@var{string}. Then this function returns a new string, in which the
1292If you did the search in a string, pass the same string as @var{string}. 1292matched text is replaced by @var{replacement}.
1293Then @code{replace-match} does the replacement by constructing and
1294returning a new string.
1295 1293
1296If @var{fixedcase} is non-@code{nil}, then @code{replace-match} uses 1294If @var{fixedcase} is non-@code{nil}, then @code{replace-match} uses
1297the replacement text without case conversion; otherwise, it converts 1295the replacement text without case conversion; otherwise, it converts