Automatically register and unregister mode watchers