ScottyB / ac-js2

Javascript auto-completion in Emacs using Js2-mode's parser and Skewer-mode.
123 stars 8 forks source link

ac-source-js2 breaks every following source in ac-sources #13

Open memeplex opened 10 years ago

memeplex commented 10 years ago

When ac-source-js2 returns one or more matches to auto-complete, every other following source in ac-sources seems to be broken. That is, none of them will return any matches (although there are matches when I remove ac-source-js2).

memeplex commented 10 years ago

The problem is in ac-prefix. During the ac-source-js2 iteration prefix-def is set to ac-js2-ac-prefix so in the next iterations the condition:

if (equal prefix prefix-def) do (push source sources)

will fail because prefix is just ac-prefix-default.

I find this behavior very disruptive. Maybe the behavior should be changed at the auto-complete level, but do you really need a custom prefix parser?