Next: , Previous: , Up: Searching and Replacing   [Index]


8.4.4 Replacing Text Using Match Data

Emacs keeps track of the start and end positions of the segments of text found during a search; this is called the “match data”.

All functions are allowed to overwrite the match data unless they’re explicitly documented not to do so. A consequence is that functions that are run implicitly in the background should likely save and restore the match data explicitly.