Use the parent-mode package to get the list of parent modes.