Added function directives.
Tying loose ends: easymenu, toplevel buffer selection, ...