[slime-devel] setting a different initial package in the REPL

Helmut Eller heller at common-lisp.net
Tue Aug 17 20:50:19 UTC 2010


* Giovanni Gigante [2010-08-17 20:01] writes:

> I've changed the initial package of slime repl by putting in .emacs:
>
> (setq slime-lisp-implementations
>    '((sbcl ("/usr/local/bin/sbcl" "--core" "/path/to/my.core" "--eval" 
> "(in-package :my-package)")))
> (setq slime-default-lisp 'sbcl)
>
> Now when slime starts, the forms I type are correctly evaluated in 
> my-package, and the repl prompt reflects this.
> However, the symbol completion (I use slime-c-p-c via slime-fancy) still 
> does not consider the symbols in my-package, until I "M-x 
> slime-repl-set-package" manually.
> Is there a way to fix this?

You can try to specify a function:

(setq slime-lisp-implementations
      '((sbcl ("sbcl") 
              :init-function 
              (lambda ()                 
                (slime-cd "...some useful place...")
                (slime-repl-set-package "mypackage")))))

Helmut





More information about the slime-devel mailing list