>> I'd much prefer a longer `font-lock-fontify-diwm` which tries to >> reproduce more or less the same behavior as your favorite, but by >> explicitly testing the different circumstances you care about. > > Sure. It could, for instance, refontify the region (if selected) > instead of the entire buffer. And probably a lot of other DWIM-ish > niceness. > Here's a patch to do this, and to fix the problem when "too large" buffers are refontified (xdisp.c for example).