slime-edit-definition from within of (defpackage )
Luís Oliveira
luismbo at gmail.com
Fri Sep 2 08:35:26 UTC 2022
That makes sense. There already exist other similar extensions to M-. that
allow it to find local functions for instance. See the slime-mdot-fu
contrib.
Cheers,
Luís
On Fri, 2 Sep 2022 at 03:43, Anton Vodonosov <avodonosov at yandex.ru> wrote:
> Hello.
>
> People may want to open package.lisp of some library to study the public
> API,
> and quickly navigate to definition of any symbol from the :export list,
> in order to read the docstring.
>
> I use slime-edit-definition (with the M-. shortcut) for navigation to
> docstrings.
>
> But that usually does not work from within of (defpackage ) form,
> because slime determines the current package based on the (in-package)
> at the top of the file and usually package files have
>
> (in-package :cl-user)
>
> (defpackage :some-lib
> (:export #:some-function
> #:another-function
> ...))
>
>
> So when cursor stays on #:some-function and M-. is pressed
> slime says "No known definition for: #:some-function (in :cl-user)"
>
> As a workaround I temporarily insert (in-pakcage :some-lib) above the
> (defpackage ).
>
> But it would be convenient if slime understood that the within the :export
> option of defpackage the symbols belong to the package being defined
> and not to the closest (in-package ).
>
> So that the proposal for consideration of the slime maintainers.
>
> Best regards,
> - Anton
>
--
Luís Oliveira
https://kerno.org/~luis/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20220902/376dbe74/attachment.html>
More information about the slime-devel
mailing list