Add company backends for AUCTeX #606

merged 1 commit into from Jul 19, 2014


None yet

3 participants

alexeyr commented Jul 15, 2014

No description provided.

@bbatsov bbatsov and 2 others commented on an outdated diff Jul 15, 2014
@@ -35,6 +35,15 @@
(prelude-require-packages '(auctex))
(require 'smartparens-latex)
+(defun prelude-latex-if-company-loaded ()
+ "Install company-auctex only if company is loaded."
+ (eval-after-load "company"
bbatsov Jul 15, 2014 Owner

Won't a top-level eval-after-load be sufficient by itself? I don't think there's need to modifer after-init-hook.

alexeyr Jul 15, 2014

The issue I ran into is that company-backends was set in the custom file, so it was effectively undoing the initialization. This might be desirable behavior, in which case I'll just keep eval-after-load, but it confused me for quite some time.

alexeyr Jul 16, 2014

So, should I make the change?

bbatsov Jul 16, 2014 Owner

Let's hear @dgutov's thoughts on the subject. Seems odd to me to reset the backends.

dgutov Jul 16, 2014

Sounds a bit too convoluted for my taste, but either way should work.

Most backends's documentation recommends the simpler of the two options, so users will have to solve any customizations problems they have anyway, unless they're only using Emacs for LaTeX. So it makes sense for me to do the same here.

alexeyr commented Jul 16, 2014

After considering a bit more, customized variable should probably be the final authority, if set. So I'll remove after-init-hook and document this issue in company-auctex's docs.

bbatsov commented Jul 17, 2014

Just squash those 3 commits together.

alexeyr commented Jul 19, 2014


@bbatsov bbatsov merged commit 275289a into bbatsov:master Jul 19, 2014
@alexeyr alexeyr deleted the alexeyr:company-auctex branch Jul 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment