auto-complete/auto-complete — pull request #175 by monsanto (2012-09-22 08:45:01+00:00)
Title: Fix ac-prefix.

I encountered three bugs in ac-prefix while working with my new ac-elisp source.

The first bug is that if you have two sources in succession, where the first source's prefix matches, and the second source's prefix is different from the first's, then the second source will be ignored.

The second bug is that if the last source doesn't match, no sources will be returned. This is because "point" will be set to nil, and the "finally" clause will return nil because of (and point ...) check.

The third bug is that ac-point will always be set to the last matched prefix's start. It makes more sense to set ac-point to the smallest possible value; then the range from ac-point to (point) will encompass the length of all possible prefixes.

Code review welcome!