#20 no autoloading in Xemacs

closed-fixed
None
5
2001-11-04
2001-09-22
Anonymous
No

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:

File-mode-specification-error: (wrong-type-argument
symbolp (t)).

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.

Discussion

  • Logged In: NO

    Seconded... I'd really prefer to use autoloads as well but
    it looks like I can't.

     
    • assigned_to: nobody --> turadg
    • status: open --> pending-fixed
     
  • Logged In: YES
    user_id=137402

    I think the trouble is in my code for the PEAR hook, which
    I've updated for version 1.0.0. Perhaps that will cure the
    problems under XEmacs.

    Let me know.

     
  • Scott Evans
    Scott Evans
    2001-10-23

    Logged In: YES
    user_id=22786

    (I was the "seconded" guy.)

    We're closer now. :) The first time I autoload a buffer, I
    get this error:
    File mode specification error: (void-function speedbar-
    add-supported-extension)

    (I'm not a speedbar user.) If I do M-x load-library
    speedbar, the autoload works great. So it looks like all
    you need is a
    (require 'speedbar)

    and all is well.

    -scott

     
  • Logged In: YES
    user_id=137402

    Yep, (require 'speedbar) should do it. See version 1.0.1.

     
    • status: pending-fixed --> closed-fixed