I have elaborated on all these in my other long reply. I would just
conclude here that because both calculate-indent-function and
prog-indentation-context try to solve same problem, they are bound to
have overlapping parts. It's just that calculate-indent-function is
more general, easier to understand for prog authors and it solves
three problems at once - replacement of indent-line-function, removing
extra prog-indentation-context/prog-widen and not exposing
multi-mode complexities.
STRING-BEFORE/STRING-AFTER/PREVIOUS-CHUNKS look like the main complexity
(from smie.el's point of view, they all seem pretty painful to support).
Note also that the intention of the `hard-widen-limit` is to make it
work seamlessly for all existing code that use widen. While
prog-indentation-context requires to teach every mode out there to use
prog-widen instead of widen. This doesn't sound right at all.
The reason is that your suggestion risks breaking code since it changes
the behavior of `widen'.
Maybe the breakage would be extremely limited or even not exist at all,
in which case the tradeoff is probably worth it. My gut feeling is that
it's too risky, but that's just my gut feeling.
Note also that most modes don't bother using widen, and search&replace
is pretty easy to do. But if my fear is unfounded, then indeed it's
better to just change `widen' directly.
Stefan