Add parent-mode.

Just a small utility extracted from `number-font-lock-mode` so it's reusable.