From: Eli Zaretskii Date: Sat, 6 May 2017 08:06:38 +0000 (+0300) Subject: ; * lisp/replace.el (query-replace-regexp, replace-regexp): Doc fixes. X-Git-Tag: emacs-26.0.90~521^2~459 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff315081a1dd8aa3efc30d65f32f8af503059f86;p=emacs.git ; * lisp/replace.el (query-replace-regexp, replace-regexp): Doc fixes. --- diff --git a/lisp/replace.el b/lisp/replace.el index a7b8ae6a347..477cc9c3055 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -405,8 +405,8 @@ replace backward. Fourth and fifth arg START and END specify the region to operate on. -In TO-STRING, `\\&' or `\\0' stands for whatever matched the whole of -REGEXP, and `\\=\\N' (where N is a digit) stands for whatever matched +In TO-STRING, `\\&' stands for whatever matched the whole of REGEXP, +and `\\=\\N' (where N is a digit) stands for whatever matched the Nth `\\(...\\)' (1-based) in REGEXP. The `\\(...\\)' groups are counted from 1. `\\?' lets you edit the replacement text in the minibuffer @@ -652,9 +652,9 @@ replace backward. Fourth and fifth arg START and END specify the region to operate on. -In TO-STRING, `\\&' or `\\0' stands for whatever matched the whole of -REGEXP, and `\\=\\N' (where N is a digit) stands for -whatever matched the Nth `\\(...\\)' (1-based) in REGEXP. +In TO-STRING, `\\&' stands for whatever matched the whole of REGEXP, +and `\\=\\N' (where N is a digit) stands for whatever matched +the Nth `\\(...\\)' (1-based) in REGEXP. `\\?' lets you edit the replacement text in the minibuffer at the given position for each replacement. @@ -663,7 +663,8 @@ followed by a Lisp expression used as part of the replacement text. Inside of that expression, `\\&' is a string denoting the whole match, `\\N' a partial match, `\\#&' and `\\#N' the respective numeric values from `string-to-number', and `\\#' itself for -`replace-count', the number of replacements occurred so far. +`replace-count', the number of replacements occurred so far, starting +from zero. If your Lisp expression is an identifier and the next letter in the replacement string would be interpreted as part of it, you