Simplify parent-mode-map using recursion.
Make parent-mode-map an internal function.