help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query-replace is misbehaving!


From: Siegfried Heintze
Subject: Re: Query-replace is misbehaving!
Date: Wed, 4 Sep 2002 22:32:06 -0600

Is there an error in the documentation at
http://www.gnu.org/manual/elisp-manual-21-2.8/html_mono/elisp.html?

If so, were is the correct documentation?
    Thanks,
                Siegfried
----------------------------------------------------------------------------
------------------

Function: perform-replace from-string replacements start end query-flag
regexp-flag delimited-flag &optional repeat-count map
This function is the guts of query-replace and related commands. It searches
for occurrences of from-string in the text between positions start and end
and replaces some or all of them. If start is nil, point is used instead,
and the buffer's end is used for end.

If query-flag is nil, it replaces all occurrences; otherwise, it asks the
user what to do about each one.

If regexp-flag is non-nil, then from-string is considered a regular
expression; otherwise, it must match literally. If delimited-flag is
non-nil, then only replacements surrounded by word boundaries are
considered.

The argument replacements specifies what to replace occurrences with. If it
is a string, that string is used. It can also be a list of strings, to be
used in cyclic order.

If replacements is a cons cell, (function . data), this means to call
function after each match to get the replacement text. This function is
called with two arguments: data, and the number of replacements already
made.

If repeat-count is non-nil, it should be an integer. Then it specifies how
many times to use each of the strings in the replacements list before
advancing cyclicly to the next one.

If from-string contains upper-case letters, then perform-replace binds
case-fold-search to nil, and it uses the replacements without altering the
case of them.

Normally, the keymap query-replace-map defines the possible user responses
for queries. The argument map, if non-nil, is a keymap to use instead of
query-replace-map.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]