refactor all of "emacs_mode" impl: it no uses a simple lookup table for most key bindings
updated TODO
some common_func api cleanup