|Version 9 (modified by gz, 4 years ago) (diff)|
SLIME is an emacs mode for interacting with Common Lisp systems.
The SLIME developers recommend that users download the CVS version. It changes often and usually for the better. The emacs and lisp sides (the lisp side is known as SWANK) need to be in kept in sync, since the protocol they utilize is volatile.
If you don't already have one, create a file called .emacs in your home directory. On Windows systems, it's not always clear what emacs thinks your home directory is. You can type C-x C-f and use "~/.emacs" as the file to find and you'll end up in the right place. (That works on Unix systems, too, of course.)
Add the following code fragments to your .emacs file to configure SLIME to work with Clozure CL, using UTF-8 as the default encoding.
(set-language-environment "utf-8") (add-to-list 'load-path "~/src/slime/") ;or wherever you put it ;;; Note that if you save a heap image, the character ;;; encoding specified on the command line will be preserved, ;;; and you won't have to specify the -K utf-8 any more. (setq inferior-lisp-program "/usr/local/bin/ccl64 -K utf-8") (require 'slime) (setq slime-net-coding-system 'utf-8-unix) (slime-setup '(slime-fancy))
With this in place, you should be able to start up SLIME with M-x slime, and print and read Unicode characters:
CCL> (format t "~c" #\u+2021) ‡ NIL CCL> (format t "~c" #\skull_and_crossbones) ☠ NIL CCL> (defparameter language '日本語) LANGUAGE CCL> language 日本語
Using SLIME with the IDE
In the IDE's preferences you can ask it to listen for connections from SLIME. Noting the port number there, you can then use M-x slime-connect to establish a connection from emacs.
Recall that the SLIME developers recommend that you use the latest version from CVS. So you can expect the version of SWANK (the lisp side of the slime protocol) to get out of sync with the Emacs version. This is even more likely if your emacs has SLIME bundled, as Aquamacs does. While it may be in your best interest to ignore the convience of the bundled versions and follow the advice of the SLIME developers, you can wait until version mismatch becomes a problem.
In some scenarios errors and logging appear in the background stream of the IDE. Examples include complaints from objective C about leaks and errors during nib loading. For that reason you may want to avoid opening the IDE application but instead run it like any other unix command. Assuming you moved your the IDE application into /Applications, can do that by invoking "/Applications/Clozure_CL64.app/Contents/MacOS/dx86cl64".