Make it possible to change the mode list when the mode is enabled.

Previously it kinda worked, but it had troubles unregistering the
regexp when disabling the mode.