3 ms·
Coding Emacs's M-x in Lisp
- aerique 17y agoI don't know about anything Emacs internals but what a strange remark: "I recently wanted to change how `M-x' works. The command behind it is called `execute-extended-command'. It is written in C. This is disappointing for my desires to tinker, but not all together surprising either. It is a pretty central piece of the Emacs infrastructure." It being a central piece of infrastructure I would expect it to be written in a higher level language for better maintainability.
- alextp 17y agoBut since it is a pretty stable and simple structure it is written in a lower level language for either stability or performance or opacity.
- jrandom 17y ago(if (and (not (null suggest-key-bindings)) My C-oriented brain screams bloody murder at this. (I still want to learn Clojure.)
- shaunxcode 17y agoIt's because you are missing the other part of the and (if (and (not (null suggest-key-bindings)) (null executing-kbd-macro)) if(not(null(suggest-key-bindings)) && null(executing-kbd-macro)) Does that help?
- jrandom 17y agoNo. I mean, I understand it just fine, I just hate the structure of it. Something about it causes revulsion, something that would probably go away if I actually sat down and learned lisp.
- shaunxcode 17y agoyou'll end up with the inverse problem when you go back to infix notation though - be warned! when I see func(arg) I feel like I am on the inside of a star fruit.