Sorry, but the patch in http://lists.gnu.org/archive/html/emacs-devel/2005-11/msg01522.html was broken with many "typos". I thought I was testing it but obviously I was not. What do I need to do to test it? I was just recompiling the function inside emacs with M-C-x. I have attached a patch that I hope is better, but I have not tested this either. I am sending it now so that the old patch does not get used.