Using dayLISP with Emacs

Fortunately Emacs is a great editor for lisp (figures since much of it is written in lisp). For the trivia lovers look at this history of Emacs. Whe I play with dayLISP and write lisp for it I use Emacs and run dayLISP in an inferior lisp buffer in Emacs. Emacs then has key combinations to evaluate lisp expressions in your file in the lisp interpretor. This allows for a quick way to try stuff in lisp.

Quick instructions for current Emacs Users

  1. Create a batch/script file somewhere in the PATH of your machine. The script should be called lisp and include the command: java -jar dayLISP.jar providing adequate paths for java and the jar file.
  2. Test the batch/script file by typing lisp at the command prompt while not in the same directory as the file.
  3. Start Emacs
  4. Use the command M-x run-lisp This will start dayLISP and show the REPL in a new buffer called *inferior-lisp*. (Emacs by default executes lisp at the system prompt and sets the input and output of the process to the new buffer.)
  5. Create a buffer for your lisp source file. Name files with the lsp extension. Files with lsp or lisp extensions will be treated as lisp source in Emacs.
  6. When you want to evaluate a lisp form put the point within the form and press C-M-x. Looking at the REPL buffer you will see the results. If the form you evaluated was a defun or other defining form you can exercise it in the REPL.

Instructions from other Emacs sites with more information

Leave a Reply