[slime-devel] Re: swank:eval-string in wrong package?

Helmut Eller e9626484 at stud3.tuwien.ac.at
Tue Mar 16 21:29:52 UTC 2004


Peter Seibel <peter at javamonkey.com> writes:

> That makes sense to me. Though it seems like it might be nice for
> INTERACTIVE-EVAL to take an optional package name so one can send
> this:
> 
>   "(:emacs-rex (swank::interactive-eval \"(foo bar baz)\" :some-package-name) nil t 477)"
> 
> And have the READ of "(foo bar baz)" happen in the package
> SOME-PACKAGE-NAME instead of *BUFFER-PACKAGE* (or in cases where there
> is no *BUFFER-PACKAGE*)
> 
> > If you need to READ in a particular package, you can use the same
> > approach as we do for INTERACTIVE-EVAL.
> 
> You lost me there. It looks like it just uses *BUFFER-PACKAGE*.

You value of *BUFFER-PACKAGE* is derived from the package attribute in
the :emacs-rex event.  It was nil in the example, which means "take the
current *package*".  You can pass the package name to slime-rex (or
slime-eval).  I'd say you need a *BUFFER-PACKAGE* and another package
write a should write a special function for that.

Helmut.




More information about the slime-devel mailing list