This page is meant for XEmacs and LISP dummies.

To configure your machine to use Lisp, you can follow these steps.

  1. Download and install XEmacs from http://www.xemacs.org/Download/index.html
  2. Download clisp from http://clisp.cons.org/ look on the right hand side of the page under “Get CLISP” section.
  3. Unzip it in a folder where you want to install it and then run the file “install.lisp, make sure that the folder path named doesn’t have spaces.
  4. Download slime from http://common-lisp.net/project/slime/
  5. Unzip slime in your XEmacs folder.

Configure XEmacs

  1. Run XEmacs and click on the Options menu and then on Edit Init file. If you are using XEmacs for the first time then it may be ask you if you want a “.emac” file, select the default options it should work.
  2. Now, in the init-file copy the following code, this will connect XEmacs to slime:

;slime

;or replace it by the correct path in the correct format(depending upon your system)

;you don’t need to give full path name if your PATH environment variable is properly set, in that case the clisp

;installation path can have spaces, the bug is with the add-to-list function

  (add-to-list 'load-path "C:\\Program Files\\XEmacs\\slime-1.0")

  (require 'slime)

  (slime-setup)

  1. Now to configure clisp add the following code:

;connecting clisp

(load-library "inf-lisp")

(setq inferior-lisp-program "c:\\clisp-2.33.1\\clisp.bat -I")

; the "-I" is important.

  1. If you want to remove the toolbar, and then put this code

;remove the toolbar

(set-specifier default-toolbar-visible-p nil)

  1. You can also put the following code so that when you press the cursor is at properly indented position

;indenting

(defun my-set-newline-and-indent()

    (local-set-key [return] 'newline-and-indent))

(add-hook 'c++-mode-hook 'my-set-newline-and-indent)

(add-hook 'lisp-mode-hook 'my-set-newline-and-indent)

(add-hook 'Lisp-mode-hook 'my-set-newline-and-indent)

  1. To use the spell checker(when you are using XEmacs for some other purpose)
(setq ispell-program-name "aspell")
  1. Save the file and close and reopen XEmacs.

N.P.- The slime developers are planning to integrate slime with XEmacs (and provide it as a package) or it might be already available with other versions of XEmacs. If that’s the case then go to Tools -> Packages -> Add Download site, and select a download site. Then go to Tools -> Packages -> List and Install. A new page will open up scroll down to the bottom of the page instructions are present there, then go and select slime. This should download and install it.

XEmacs and Slime shortcuts

When you start XEmacs and open a LISP file XEmacs should be in LISP mode and slime should startup and automatically connect to clisp. If it doesn’t then you can change the mode manually.

 “M- lisp-mode” will change the mode to lisp and “M-slime” should change the mode to slime and start clisp.

Here “C- “ refers to pressing the control key.

“M- “ refers to pressing the alt or meta key.

Sh- “ refers to pressing the shift key.

Some commonly used shortcut keys are listed below:

C-Ins

Copy

Sh-Ins

Paste

Sh-Del

Cut

C-x k

Kill buffer or close file

C-g

Cancel the current command

C-v

Page Down

M-v

Page up

C-x h

Select All

C-x 2

To split the screen into 2

M-g <line-number>

Goto Line

C-x u

Undo

C- k

Yank(delete) line, this can also cut the line

C-M-\

Reindent region

q

To close random error buffer(window) which sometimes opens up

C-h t

Tutorial

C-x b

Change buffer

C-x C-b

Display list of buffers

There are hundreds of other short-cut keys which are available, you almost don’t need to take your hands of the mouse, and type as fast as you can think. Look into the XEmacs documentation.

Most Importnant: If you type “C-h w “ then it will ask you for “where is the command”, type the most likely English name for the command and it will show you the shortcut key bindings.

If you look into the menu then it will show you the short cut keys next to the command name.

Slime has the cool option of showing lisp documentation.

If you have something nice for me to put or link to, feel free to email it to me.

Also you can email to and ask questions at or participate in discussions related to XEmacs at:

comp.emacs.xemacs

for lisp related discussion:

comp.lang.lisp

ssinghi AT kreeti DOT com
Kreeti Technologies
Viewable With Any
Browser