xahlee / xah-fly-keys

the most efficient keybinding for emacs
http://xahlee.info/emacs/misc/xah-fly-keys.html
484 stars 83 forks source link

Refactoring to use multiple minor-mode keymaps #66

Closed DanLanglois closed 4 years ago

DanLanglois commented 5 years ago

https://github.com/xahlee/xah-fly-keys/issues/64

I've commented out your mutable xah-fly-key-map. Instead, I am switching between two immutable keymaps: xah-fly-manage-insert-mode-map and xah-fly-manage-command-mode-map. Note my use of emulation-mode-map-alists.

Also, there is reformatting. I have a doubt about that, and at least it might be better to do it as a separate commit. It's better to see at a glance which commits are just reformatting and which actually change code. But even more than that, I don't think I have an argument to make for bulk-reformatting tools at all. If you care about code review and bug tracking, it can really mess with your process. I'm not actually hung up on code style. Except I do have one point -- why do I have to reformat everything all at the same time? Because it's all in one file. I am trying to get used to how it is with lisp, that there are not restrictions: methods are not organized in classes, classes are not namespaces, files can have any mix of definitions. I've noticed how the Lisp libraries tend to have large packages/namespaces and large files. There might be something missing for better organization of code..

DanLanglois commented 5 years ago

I stripped out the reformatting.

DanLanglois commented 5 years ago

note, I had stumbled upon this issue today, which as it turns out, is a known bug:

https://github.com/xahlee/xah-fly-keys/issues/18