Contrary to the recommendation in php-mode-099.el, I
decided to put the following in my .emacs:
(autoload 'php-mode "php-mode-097" "PHP mode" t)
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))
Which really works surprisingly well iff I'm using
FSFmacs (ver 20.7.1); it doesn't work at all if I'm
using Xemacs (21.1). Instead, when I visit a .php
file, I get:
which disappears if I comment out the PEAR stuff (why
that? well, try turning on debug-on-signal). If I do
that, however, Xemacs will load php-mode, but I'll end
up in default-major-mode. If I then M-x php-mode, I'm
where I expect to be.
In summary, the problem apparently affects only Xemacs,
and happens with versions of php-mode > 0.9.6, which is
to say that 0.9.6 works.
For the present, I can (load-library), but this is
really a poor way to do things as I have a lot of other
lisp I need to load at startup, and I would prefer to
defer loading php-mode until I visit a .php file,
particularly since I edit PHP with only middling frequency.