There is no reason the xemacs ebuilds should call export on setting WANT_AUTOCONF, and it severely pollutes the environment.
OK. I'll prepare new ebuilds for 21.4 and 21.5 with export removed.
Ebuilds xemacs-21.4.22-r4.ebuild and xemacs-21.5.34-r2.ebuild are updated and have been committed. xemacs-21.5.34-r2.ebuild will be subject to stabilization request later this week unless some problems are reported. This is due to bug 475658.
It was xemacs-21.4.22-r4.ebuild that was subject to stabilization. (I erroneously mentioned xemacs-21.5.34-r2.ebuild as a candidate for stabilization. The 21.5 is still beta from upstream and is not ready for stabilization yet.) Anyway. As mentioned, xemacs-21.4.22-r4.ebuild is now stable and xemacs-21.5.34-r2.ebuild is in the tree.
You don't appear to realize what exporting variables in the global scope of an ebuild does. I'm pretty sure I was asked about precisely that problem in one of the quizzes, but that was a long time ago. I've fixed it for you now.