

Coding Emacs's M-x in Lisp - keyist
http://aaronhawley.livejournal.com/26901.html

======
aerique
I 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
But 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

        (if (and (not (null suggest-key-bindings))
    

My C-oriented brain screams bloody murder at this. (I still want to learn
Clojure.)

~~~
shaunxcode
It'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
No. 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
you'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.

