SLIME - Lisp Development

Table of Contents


;; Slime Setup
(add-to-list 'load-path "~/slime")
(require 'slime)

Starting Slime

M-x slime

Saving your work

Put your lisp code in a file ending in .lisp and you can compile the functions with C-c C-c anywhere after the (defun line. These are now available at the REPL prompt in SLIME


Switch to output buffer

C-c C-z displays the SLIME output buffer

Loading lisp files

  • Open the .lisp file
  • C-c C-l loads the file in SLIME

Property Lists

p-lists are just lists that are defined by their contents. The elements alternate as symbol and value pairs such as

CL-USER> (list (:a 1 :b 2 :c 3)
(:A 1 :B 2 :C 3)

You retrieve values of a p-list with GETF as in

CL-USER> (getf (list (:a 1 :b 2 :c 3) :b)

FORMAT arguments

~a Consume and list argument and print it in human readable form
~10t Emit enough spaces to move to column 10
~% Emit a newline
~{ and ~} Loop over a list processing the enclosed format string

Author: Bernt Hansen

Validate XHTML 1.0