diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-05-06 11:06:38 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-05-06 11:06:38 +0300 |
commit | ff315081a1dd8aa3efc30d65f32f8af503059f86 (patch) | |
tree | 85cd28c29ca19ce6235227dbf76503a0315976c3 /lisp/replace.el | |
parent | 927dcbd2e6e0e53fcfb09296716e11c002ab1518 (diff) | |
download | emacs-ff315081a1dd8aa3efc30d65f32f8af503059f86.tar.gz emacs-ff315081a1dd8aa3efc30d65f32f8af503059f86.tar.bz2 emacs-ff315081a1dd8aa3efc30d65f32f8af503059f86.zip |
; * lisp/replace.el (query-replace-regexp, replace-regexp): Doc fixes.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 13 |
1 files changed, 7 insertions, 6 deletions
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 |