[slime-devel] (in-package foo)

Brian Downing bdowning at lavos.net
Sat Oct 23 04:59:20 UTC 2004

On Fri, Oct 22, 2004 at 06:38:48PM -0700, Neo-LISPer wrote:
> does not change *PACKAGE*. Any way to fix this?

When you use one of the evaluation commands to run an IN-PACKAGE form in
an editor buffer, it changes the package of that buffer (which is
displayed in the modeline).  Future evaluation/compilation commands in
the buffer will be run in that package.  The buffer package is also
autodetected when first loading a buffer.

I assume you wanted it to change the package in the *slime-repl* buffer?
To change the REPL's package, either type an IN-PACKAGE form there or
use the ,change-package REPL shortcut (,ch TAB p TAB works :).

This behavior is actually vastly prefered to having a global package.
Imagine you are testing a library you've written at the REPL in CL-USER.
You've run (use-package :your-library) to import its external symbols.
You can load up a source file for your library internals into a buffer
and immediately C-c C-c a new or changed defun in that buffer, and the
changes will wind up in the right package in your Lisp image without
disturbing your test environment in the REPL.

Hope this helps,
*** Brian Downing <bdowning at lavos dot net> 

More information about the slime-devel mailing list