8.11 Searching and replacing text

8.11.3 Replacing text

You can search for text and replace it with other text using the Edit > Replace. In the echo area, you are prompted to supply the text to be found and the text to replace it. In addition, whenever that text is found, you are asked whether or not to replace that occurrence of it. Note that this type of searching is not incremental.

For instance, assume you wanted to replace every occurrence of "equal" to "equalp".

1. Choose Edit > Replace.

The following appears in the echo area:

Query Replace String:

2. Typeequal and press Return.

The echo area now shows the following:

Replace "equal" With:

3. Typeequalp and press Return.

At every occurrence of "equal" after the current cursor position, the following message is printed in the echo area:

Replace equal with equalp?

Other options are also available. See the end of this section for more details.

Note: Both Edit > Find and Edit > Replace start searching from the current position in the buffer. When Edit > Find reaches the end of the buffer, it starts again at the beginning, but Edit > Replace stops. To replace all occurrences of a text string in the buffer, you must ensure you are at the top when you begin.

Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker