#1413 was originally a request for reinstating emacs-style macros. I'm not likely to do that. Emacs macros are seldom used, and they are not very powerful without even more nerdy (non-existent) extensions such as emacs registers.
Instead, I shall attempt to make it easier to write Leonine scripts that change body text.
For example, I recently worked on the php colorizer in leo/modes/php.py. This involved renaming groups of rules in a systematic way. Neither emacs macros nor regular expressions come anywhere close to handling this task. So a Leonine script is required.
While thinking about such scripts, I reviewed Leo's resources for changing body text. What I found was a mess of overlapping, ugly code. Substantial refactoring is in order. The goal will be to create a pattern something like this:
u = c.undoer
data = u.beforeChangeBody()
<< change p.b >>
c.afterChangeBody(undo_type, data)
This pattern should replace all calls to LeoBody.onBodyChanged and c.updateBodyPane. A guiding principle will be to avoid keyword arguments (kwargs) wherever possible.
There are complexities involved that I won't discuss here. We shall see what happens :-)
Edward