Linker::doEditSectionLink() and Linker::doEditSectionLinkForOther() and their respective hooks are redundant and confusing. They do exactly the same thing with a slightly different interface. Their hooks are not only redundant but relatively ineffective, because they wrap in brackets and a span *after* the hook returns. This makes them useless for, e.g., changing the section edit link to an image (can't remove brackets), or using any block-level element (wrapped in a span).
Make Linker::doEditSectionLink() public, and change its interface to be like that of editSectionLink(). Use that in Parser (which is the only place that uses the old functions that I can find), and mark the old two functions deprecated. Add a hook 'DoEditSectionLink' with a new, clean interface, which is run immediately before the return so it can override the whole function. Advise people in hooks.txt to use the new hook, not the old ones.