[slim-vim] the slime- prefix

Brad Beveridge brad.beveridge at gmail.com
Fri Jul 28 23:55:27 CDT 2006


On 26/07/06, Larry Clapp <larry at theclapp.org> wrote:
> On Wed, Jul 26, 2006 at 02:36:36PM -0700, Brad Beveridge wrote:
> > On 26/07/06, Larry Clapp <larry at theclapp.org> wrote:
> > > On Tue, Jul 25, 2006 at 08:48:10AM -0700, Brad Beveridge wrote:
> > > > I could probably be convinced either way.  Initially I wanted to
> > > > mimic slime.el where possible, but I think that packaging is the
> > > > way to go.  However, even within the package I think I would
> > > > like to use fully qualified names.
> > > >
> > > > eg
> > > > (defpackage #:slime
> > > >  (:export #:connect))
> > > > (in-package #:slime)
> > > > (defun slime:connect () ....)
> > > >
> > > > That way you can grep slime.el and slime.lisp for functions with
> > > > the regular expression slime.foo, and match both.
> > >
> > > That works for me.  Good thinking.
> > >
> > > In general, I think a package shouldn't fully-qualify its own
> > > symbols, but in this case I think it serves a purpose.  Possibly
> > > this will fail the test of time, but for now it seems like a good
> > > compromise.
> >
> > Actually, I'm going to change my mind again :)
> > It turns out that in order to do slime:foo, even internally to the
> > package, we would need to export foo.  That's fine for the external
> > functions, but not for every single function.  So I am now in favour
> > of dropping the SLIME- prefix entirely.
>
> Ah.  Indeed.  Well, we can still grep for slime-foo stuff in either
> kind of file:
>
>   grep -E '(slime[-:]:?)?foo'
>
> Test case:
>
>   % print -l "slime::foo" "slime:foo" "slime-foo" "foo" | grep -E '(slime[-:]:?)?foo'
>   slime::foo
>   slime:foo
>   slime-foo
>   foo
>
I've just renamed/repackaged slime.lisp so that the SLIME- prefix is
removed.  Though there are a couple of functions that I am leaning
toward putting the prefix back on, namely
eval, compile-file, and inspect.
The SLDB- prefix probably ought to be put into its own file and
package at some stage too.

Cheers
Brad


More information about the slim-vim mailing list