Here's yet another revised patch. The (call-interactively) at the end of (diff-apply-hunk) was important, it turns out. This would force it to use the new logic to move to the next hunk, instead of the legacy logic. I purposely left the behavior of (diff-next-hunk) unchanged from before when running non-interactively, and here I explicitly want the new behavior. This patch puts the (call-interactively) back in, and explains the rationale.