I think this patch fixes bug #881. It is against the emacs-23 branch, because I could not check out the trunk today. Tom