Add import-symbol-at-point to package-fu #573
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
returnsnil
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.