arnested/php-extras — pull request #6 by joddie (2013-06-09 20:45:13+00:00)
Title: Allow `completion-at-point' to use php-extras' cached function names.

This is another very simple patch which lets php-extras provide completions for Emacs' built-in completion mechanism (`completion-at-point`) as well as for auto-complete. I know, everyone else uses auto-complete, but sometimes I prefer the plain old pop-up buffer style ;-)

This patch defines one new function, `php-extras-completion-at-point`, and adds it locally to the `completion-at-point-functions` hook in the php-mode hook. This allows completing PHP function names using Emacs' built-in completion system.

`php-mode` claims to have something similar to this, but I can't get it to work, and I like the fact that `php-extras` can index the current version of the manual from the net.

Note: I think that, if this patch is accepted, the code for lazy-loading the file with the hash table of functions will be duplicated in three places. It might be worth factoring that out into a separate function (and maybe provide a helpful message if the file isn't found for some reason). I'm happy to submit an extra patch to do that if you like.