07.01.2013 Views

SLIME User Manual version 3.0-alpha - Common Lisp

SLIME User Manual version 3.0-alpha - Common Lisp

SLIME User Manual version 3.0-alpha - Common Lisp

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2: Getting started 5<br />

"--core" "/home/me/sbcl-cvs/output/sbcl.core")<br />

:env ("SBCL_HOME=/home/me/sbcl-cvs/contrib/"))<br />

initializes SBCL_HOME in the subprocess.<br />

2.5.3 Loading Swank faster<br />

For SBCL, we recommend that you create a custom core file with socket support and POSIX<br />

bindings included because those modules take the most time to load. To create such a core,<br />

execute the following steps:<br />

shell$ sbcl<br />

* (mapc ’require ’(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))<br />

* (save-lisp-and-die "sbcl.core-for-slime")<br />

After that, add something like this to your ‘.emacs’:<br />

(setq slime-lisp-implementations<br />

’((sbcl ("sbcl" "--core" "sbcl.core-for-slime"))))<br />

For maximum startup speed you can include the Swank server directly in a core file. The<br />

disadvantage of this approach is that the setup is a bit more involved and that you need to<br />

create a new core file when you want to update <strong>SLIME</strong> or SBCL. The steps to execute are:<br />

shell$ sbcl<br />

* (load ".../slime/swank-loader.lisp")<br />

* (swank-loader:dump-image "sbcl.core-with-swank")<br />

Then add this to your ‘.emacs’:<br />

(setq slime-lisp-implementations<br />

’((sbcl ("sbcl" "--core" "sbcl.core-with-swank")<br />

:init (lambda (port-file _)<br />

(format "(swank:start-server %S)\n" port-file)))))<br />

Similar setups should also work for other <strong>Lisp</strong> implementations.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!