Skip to content
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

Avoid declaring ac-trigger-commands and company-begin-commands locally #1

Closed
wants to merge 1 commit into from

Conversation

purcell
Copy link

@purcell purcell commented Apr 11, 2014

No description provided.

@purcell purcell mentioned this pull request Apr 11, 2014
@abo-abo
Copy link
Owner

abo-abo commented Apr 11, 2014

If I'm not mistaken, there's an actual problem with your approach
that's bigger than the potential problem that you're trying to solve:

(require 'worf)
(require 'auto-complete)

means that ac-trigger-commands will not be modified and the automatic completion
will not work in worf-mode at all. And 99% of the time, ac-trigger-commands will
just stay at '(self-insert-command) anyway.

Of course this will work, but there's no way to guarantee the order:

(require 'auto-complete)
(require 'worf)

@purcell
Copy link
Author

purcell commented Apr 11, 2014

I see your point: neither solution is clean when the code is run at load-time. I guess that in the end, I'd personally add separate "worf-ac-setup" and "worf-company-setup" functions, and do the magic explicitly in there rather than implicitly when the file is required.

P.S. I noticed you're using projectile-find-file, but you don't require or depend on projectile.

@abo-abo abo-abo force-pushed the master branch 2 times, most recently from fd7ee6d to 015d2fd Compare April 22, 2017 11:16
@purcell purcell closed this Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants