-
Notifications
You must be signed in to change notification settings - Fork 1
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 next-source-p
and previous-source-p
.
#24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hgluka I didn't look deep into it, but if next-source-position
handles non-empty sources then next-source
shouldn't need to know about it.
Don't forget to enrich the test suite with these new added functions.
@hgluka I still think that this solution is subpar. I think everything would become easier if |
Ah, good point, I didn't think of that. Thanks for the help @aadcg! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that your solution is subpar. I've pushed some commits.
Does it look good? Am I missing something?
Note that the CI is failing but it's unrelated to this PR.
@aadcg Thanks, it looks a lot better! |
Add new next-source-p, previous-source-p and adjacent-source. Refactor next-source.
@aadcg I just realized that we need |
@hgluka you can still use |
Oh, |
Description
This PR adds
next-source-p
andprevious-source-p
as exported functions.I did this by making a
next-source-position
function thatnext-source-p
andnext-source
can have in common.Discussion
The implementation might be inefficient, because of the repeated
(remove-if #'empty-source-p (sources prompter))
calls, but it seemed like the most elegant way to do it.CC @aadcg