#1413 <https://github.com/leo-editor/leo-editor/issues/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 -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/6ab169ea-db53-48d6-92bc-cae12ee8d3b2o%40googlegroups.com.
