Skip completion at point if there is no REPL buffer #142
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.
If the
completion-at-point
system is triggered, but there is no REPL buffer, thejulia-snail-repl-completion-at-point
function still attempts to communicate with the REPL buffer, yielding the following message:Unfortunately, no other
completion-at-point-functions
are allowed to attempt completion, so no completion is performed, even if later entries incompletion-at-point-functions
could have handled it (e.g., the ones provided byjulia-mode
).The documentation for
completion-at-point-functions
says to returnnil
if the completion function is not applicable. This commit changesjulia-snail-repl-completion-at-point
to check that the REPL buffer exists, and if it doesn't, it returnsnil
, allowing othercompletion-at-point-functions
to take a turn.