Emacs Archaeology

I’ve been digging through the history of Emacs and Lisp lately. Getting back to my roots, as it were. I read the original paper on Lisp, from all the way back in 1960. It continues to amaze me how much life is left in those old ideas of Lisp.

I also turned up this Emacs manual, circa 1978, from when Emacs was written in TECO and running under ITS on the PDP-10. The two major differences seem to be use of M-M- to execute commands (M-x in modern Emacs) and command names being more verbose, such as Query Replace instead of query-replace. Other than that, most of the commands are the same and still work. Lots of the stuff you’d expect in a modern Emacs were there: Dired, major modes, interactive help, regexp search.

I even found a useful command I didn’t know.

2008/12/29

Discussion

Huh. I didn’t know that command either.

R
2008/12/30

there is a lot of missing history in that document.

the M-M- is really “ESC ESC” for most people. that invoked the “mini-buffer”, a small dedicated buffer into which you could type TECO expressions
which would be evaluated after you typed another “ESC ESC”.

TECO had variables called “q-registers” with terse names like “M”. teco also had an operator to evaluate the string in a q-register. this operator was also called “M”. hence “MM” meant run the string (macro) in q-register “M”. the text after the “MM” up until an ESC was an argument passed to the macro. in the case of q-register “M”, it was a function name that was looked up and used to return a string that was eval’ed. this is how functions not bound to keypress events were implemented (brutally simple).

so in the example in the document, the user types:

ESC ESC MM Apropos ESC function-name ESC ESC

that would look up and run the function named “function-name”. later, the
keypress event M-X was used to invoke a function that read the function name and
arguments from the area under the modeline, freeing the user from having to know anything about teco (which was powerful but complex due to its terse syntax).

there is actually a teco interpreter written in elisp by dale worley if you want to try it. emacswiki will have more ancient details if you’re still interested.

/mark

Mark Kennedy
2008/12/30

Participate