julia-emacs
julia-emacs copied to clipboard
Make julia-latexsub work if point in the middle of latex symbol.
This pull request fixes two minor issues I had:
- emacs was erroring off because the
invoke-command
machinery was calling the zero-argument functionjulia-latexsub
with a nil argument. Removing thei
in the argument specifier string fixed this (might be a Spacemacs issue, not a julia-mode issue). - It wasn't doing the substitution if point is in the middle of the latex command string.
The second change seems relatively innocuous, the first might break things that invoke julia-latexsub
in ways that Spacemacs doesn't, i.e. with an argument (although it hasn't broken anything for me)
Unless I made a mistake, this doesn't work well for me: the substitution happens only if my point is within the word, not when it's at the end (in other words, the only thing which doesn't work is what was working before!). Can you confirm?
I think I can make it work with the suggestion above (currently testing it in practice).
But in general, I am a bit bothered by the fact that we don't have any unit tests for completion, so I will contribute some and in the meantime hold off on this PR.
When #81 is merged, it should also be merged to this branch, and then some tests can be added (or commented out).
Superseded by #185