Since we've now created an emacs-24 branch it seems like a good time to install this pending patch now. I'm attaching an updated copy. It's the same as before, but updated in the light of the Emacs changes since the patch was created. It seems large enough (about 20,000 lines, 653 kB) that I thought it wise to compress it. The patch is relative to bzr 107822 in the trunk.