Re: SLIME compile and load file REPL stays at "CL-USER" with "(in-package :xyz)" in code and not "XYZ"

Nick Levine <[email protected]>
Newsgroups gmane.lisp.slime.devel
Message-ID <[email protected]>
> From: Frederik Cheeseman <[email protected]>
> Date: Tue, 17 Jun 2014 07:54:20 +0000 (UTC)
> 
> When I do C-c C-k (SLIME compile/load file) the REPL stays at
> "CL-USER". Shouldn't it switch to "MORSE" because of the
> "(in-package :morse)" code line? 

No (and this applies to CL in general, not just to SLIME). This is
because, according to the spec, "load binds *readtable* and *package*
to the values they held before loading the file." In effect:

(defun load (file &key ...)
  (let ((*package* *package*))
    (in-load file ...)))

- n
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.