Closed tgbugs closed 3 years ago
Am I understanding right in that you do not use company?
If that is the underlying case, wrap the caller in hy-mode's definition instead.
Yes. I do not use company but it is installed (presented but unloaded). I assume your suggestion is to add it here https://github.com/hylang/hy-mode/blob/e161a0c9a2b1f55c14b72164d55d72e67f2bf1e3/hy-mode.el#L297 since that is actually the only place it is invoked during normal usage?
Additional note which might make a difference. I am also using hy-mode through org-babel, and if that were to trigger inferior-hy-mode-hook then my understanding of your proposed solution would not work.
Yea there, thanks for contributing btw. What's the issue with calling it through org-babel? I don't think it starts up company there.
Happy to! After investigating I think whatever was going wrong before has resolved itself. If it comes up again I will track the issue down. I have this vague memory that the issue might have occurred when/because I did not have jedhy installed.
I wrapped both the initial call and setting the hook in a test for the company feature.
Thanks! Merged.
Before this fix if company-mode was not loaded then hy-mode would fail to load because it would not find company-backends and company-grab-symbol.
This commit fixes the issue by checking whether those symbols are bound before executing code that depends on them.