I can confirm that the patch cleanly applies on top of emacs-26 branch too, but in any case here is a version rebased on top of that branch.