# HG changeset patch # User Richard M. Stallman # Date 1124574531 0 # Node ID de7df04c6d6b28ade4fb3f2f2bbc8bdb55a8a3cf # Parent d92890473bd3f70ef37f53e51bcc178f00a4664e (replace-regexp-in-string): Doc fix. diff -r d92890473bd3 -r de7df04c6d6b lisp/subr.el --- a/lisp/subr.el Sat Aug 20 21:48:20 2005 +0000 +++ b/lisp/subr.el Sat Aug 20 21:48:51 2005 +0000 @@ -2167,9 +2167,10 @@ is non-nil, start replacements at that index in STRING. REP is either a string used as the NEWTEXT arg of `replace-match' or a -function. If it is a function it is applied to each match to generate -the replacement passed to `replace-match'; the match-data at this -point are such that match 0 is the function's argument. +function. If it is a function, it is called with the actual text of each +match, and its value is used as the replacement text. When REP is called, +the match-data are the result of matching REGEXP against a substring +of STRING. To replace only the first match (if any), make REGEXP match up to \\' and replace a sub-expression, e.g.