This is a backport from RETabBinder v1.6.1.
All credits go to AcidWeb having continued the original Addon TabBinder from Veev.
RETabBinder will automatically change your TAB key binding to only target enemy players when in PvP zones, and to target all enemies when not.
In the interface option panel you can customize where it should activate.