The attached patch removes some compat code for XEmacs, and Emacs 21/22.