All Manuals > LispWorks IDE User Guide > 16 The Search Files tool

16.4 Modifying the matched lines

After a search you might want to perform a replace operation within the matches, for example to rename a function or add a missing package prefix throughout your source code.

To do this, click or choose Query Replace... from the context menu in the results area to raise the Query replace in matched lines dialog.

The Query replace in matched lines dialog

Enter a regular expression to replace in the Regexp to replace: box. Enter the replacement text in the Replace by: box, and click OK.

For each of the matched lines that also matches the regular expression, an Editor tool displays the file with a prompt in the Echo Area. Type 'y' or 'n' to make the replacement or not, for each match in turn.

The Save buffers buttons choose whether to automatically save the modified editor buffers to disk at the end (Yes), ask you whether to save them (Confirm) or leave them in memory (No). To save the buffers in memory, see 12.8.1 Opening, saving and printing files.


LispWorks IDE User Guide (Macintosh version) - 01 Dec 2021 19:36:31