Update the documentation of 'perform-replace'
* doc/lispref/searching.texi (Search and Replace): Update the documentation of 'perform-replace'.
This commit is contained in:
parent
06245b625e
commit
5de608f3ed
1 changed files with 8 additions and 2 deletions
|
@ -1751,13 +1751,14 @@ of matching @var{regexp} against a substring of @var{string}.
|
||||||
If you want to write a command along the lines of @code{query-replace},
|
If you want to write a command along the lines of @code{query-replace},
|
||||||
you can use @code{perform-replace} to do the work.
|
you can use @code{perform-replace} to do the work.
|
||||||
|
|
||||||
@defun perform-replace from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end
|
@defun perform-replace from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end backward region-noncontiguous-p
|
||||||
This function is the guts of @code{query-replace} and related
|
This function is the guts of @code{query-replace} and related
|
||||||
commands. It searches for occurrences of @var{from-string} in the
|
commands. It searches for occurrences of @var{from-string} in the
|
||||||
text between positions @var{start} and @var{end} and replaces some or
|
text between positions @var{start} and @var{end} and replaces some or
|
||||||
all of them. If @var{start} is @code{nil} (or omitted), point is used
|
all of them. If @var{start} is @code{nil} (or omitted), point is used
|
||||||
instead, and the end of the buffer's accessible portion is used for
|
instead, and the end of the buffer's accessible portion is used for
|
||||||
@var{end}.
|
@var{end}. (If the optional argument @var{backward} is
|
||||||
|
non-@code{nil}, the search starts at @var{end} and goes backward.)
|
||||||
|
|
||||||
If @var{query-flag} is @code{nil}, it replaces all
|
If @var{query-flag} is @code{nil}, it replaces all
|
||||||
occurrences; otherwise, it asks the user what to do about each one.
|
occurrences; otherwise, it asks the user what to do about each one.
|
||||||
|
@ -1789,6 +1790,11 @@ user responses for queries. The argument @var{map}, if
|
||||||
non-@code{nil}, specifies a keymap to use instead of
|
non-@code{nil}, specifies a keymap to use instead of
|
||||||
@code{query-replace-map}.
|
@code{query-replace-map}.
|
||||||
|
|
||||||
|
Non-@code{nil} @var{region-noncontiguous-p} means that the region
|
||||||
|
between @var{start} and @var{end} is composed of noncontiguous pieces.
|
||||||
|
The most common example of this is a rectangular region, where the
|
||||||
|
pieces are separated by newline characters.
|
||||||
|
|
||||||
This function uses one of two functions to search for the next
|
This function uses one of two functions to search for the next
|
||||||
occurrence of @var{from-string}. These functions are specified by the
|
occurrence of @var{from-string}. These functions are specified by the
|
||||||
values of two variables: @code{replace-re-search-function} and
|
values of two variables: @code{replace-re-search-function} and
|
||||||
|
|
Loading…
Add table
Reference in a new issue