Use a hyphen with the prefixes all-, ex-, and self-.
Use a hyphen with the suffix -elect.
Use a hyphen with all prefixes before a proper noun.
Exercises:
The hyphen 1
The hyphen 2