Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import-symbol-at-point to package-fu #573

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

high-ego
Copy link

@high-ego high-ego commented Jul 5, 2020

I wrote a function analogous to export-symbol-at-point. Unfortunately, while writing it, I rewrote a large part of the contrib. I would write tests to check if I broke something, but I'm not sure how to test this.

I did a little manual checking, and the only thing I think I broke is unexporting when the symbols are written as strings. The problem is that slime-sexp-at-point returns nil when it's called from a position like ("foo"|), with the point after a string that's the last element in a list. I don't know if this is expected behaviour, and I should write a wrapper that does what I need (return "foo"), or if I should change the function.

The messages that the new version produces are a little less informative. They are the same regardless of whether the defpackage form was changed. I'll change this if anyone thinks the distinction is important.

@joaotavora
Copy link
Contributor

joaotavora commented Jul 6, 2020 via email

@luismbo
Copy link
Member

luismbo commented Jul 6, 2020

@high-ego can you have a look at João's commit and try to port things over, maybe, or double down on the need to rewrite.

In a position like ((foo)|), ‘slime-bounds-of-sexp-at-point’ would
return nil. This change makes it return the bounds of the inner (foo)
expression.
@high-ego
Copy link
Author

I decided to stick with the rewrite, and wrote some tests for the parts I rewrote. To fix the case broken before, I modified slime-bounds-of-sexp-at-point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants