I’m actually not sure how I fixed this problem… I remembered this post because I’ve been frustrated by a similar problem involving Alt+[direction] bindings.
So, for some time I’ve been trying to bind Alt+[direction] as lispy-move-[direction] in lisp-mode-shared-map (which is used as a parent keymap to all the various Lisp modes’ major maps). These bindings, once I’ve set them, are shown in the values of emacs-lisp-mode-map, common-lisp-mode-map, etc. Trouble is, no matter what, if I press, say, Alt+left in, say, emacs-lisp-mode, it will always activate ergoemacs-backward-open-bracket. According to define-key, this is because of a binding in ergoemacs--original-local-map. If I look at the value of ergoemacs--original-local-map in a Lisp buffer, it will show my Lispy Alt+[direction] bindings, and then the ErgoEmacs Alt+[direction] bindings later in the list (and apparently, they take precedence).
What really confuses me is that org-mode also binds Alt+[direction], for each direction, and ergoemacs-mode respects that perfectly well. Pressing Alt+left in an Org buffer will invoke org-metaleft every time. If I look at the value of ergoemacs--original-local-map, the Org Alt+[direction] bindings are present, and ErgoEmacs Alt+[direction] bindings aren’t. (note that I’m not talking about ergoemacs-org-metaleft and cousins; I mean ergoemacs-backward-open-bracket and such.)
How is it that Lisp buffers have Alt+[direction] so hard-set, and Org buffers don’t? Any idea how I can get my preferred bindings in the Lisp modes? (Just in case, I tried adding the lispy-move-[direction] functions to ergoemacs-functions-that-always-override-ergoemacs-mode; sadly, with no luck.) I’m also kind of curious how ergoemacs--original-local-map works, because it comes up so often when I’m trying to debug ergoemacs-mode but it’s sparsely mentioned in the code. Thank you!
—Tina