php-eldoc
php-eldoc copied to clipboard
Symbol's value as variable is void: auto-complete-mode
I get the above error when running php-eldoc-enable
. It appears to arise from this code:
(when (and (fboundp 'auto-complete-mode)
auto-complete-mode)...
This seems to fix it:
(when (and (fboundp 'auto-complete-mode)
(auto-complete-mode))...
I believe the correct fix for this (which is also #4) is simply to check if ac-sources
is bound:
(when (boundp 'ac-sources)
(pushnew 'ac-source-php-eldoc ac-sources))
Executing (auto-complete-mode)
is not always desired. Checking (bound-and-true-p 'auto-complete-mode)
has roughly the same effect, but if the point is to modify ac-sources
, might as well check for ac-sources
...