keymap() return function should accept a buffer and a prompt.

The keymap value functions should be 3 argument functions of
(PromptState,Prompt,Char). Will need to convert functions that don't match that
signature into something we can call.