| > I am sure I can ask it to format itself? You don't want to be doing anything of the sort. That is a misconception. The representation of the Lisp program in memory is not the source code. Lisp is not homoiconic according to the original definition by Douglas McIlroy, which is that programs are stored in memory in the original representation entered by the programmer. Some Lisps keep only a compiled version of the code in memory. Even those that keep the structural source code in memory (e.g. in support of the ed function in Common Lisp or something like it), it will not be faithful to the original. For example, semicolon comments are stripped away by the reader, and any read-time processing is performed. For instance, Lisps that process the backquote syntax at read time will not preserve the original. I've also never heard of a modern Lisp implementation in which a global variable definition like (defvar foo (+ 1 2)) retains the unevaluated (+ 1 2) somewhere. How integrated Lisp environments work is that there are editing buffers with code, and code is re-read from those buffers when edited, into the same running image. Some of the buffers may contain "throwaway" calculations, like interactive testing, and some contain files that are persisted (and version controlled). The user interface doesn't necessarily run in the same image; it could be connected to a remote image (exemplified by users working with Emacs to interact with an image over Slime). |