Hehe, my sabbatical has been looking like work the last few days. Several issues demanded attention:
#1731 was urgent, and
#1726 and
#1691 had to be fixed asap. Etc.
But
#1721 and
especially #1413 lead me down a merry path. This turned into a real project, as shown by the
PR for the ekr-undo branch. I won't recap the changes here.
Once I got started refactoring and simplifying Leo's code, there was no
turning back. I saw no good alternative to finishing what I
started.
Yesterday I knew it was time to end the refactoring frenzy. This morning I gave the Won'tDo label
#1733 (eliminate c.onBodyChanged). Getting rid of even a single call to c.onBodyChanged is really hard, as several failed attempts have shown. This despite the fact that earlier refactorings use u.before/afterChangeBody
inside c.onBodyChanged.
Summary
I have done a ton of refactoring in the ekr-undo branch:
- Several "faux helpers" no longer exist.
- Many evil kwargs are gone.
- Leo's code now contains many more examples of the
u.before/afterChangeBody pattern.
This is the absolute end of the line for further refactoring. In particular, I shall never remove the approximately 30 calls to
c.onBodyChanged, despite the unpleasant kwargs. If you think it's worth doing, then I invite you to try doing so yourself. I think you'll find it is much harder than it looks. Don't you have anything better to do :-)
Important sabbatical projects are calling me. I'll continue to fix urgent bugs, but that's all.
Edward