[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Generating autoloads for multiple Emacs flavors



I have both emacs21 and emacs-snapshot installed, and I'm having a
problem with installing the Debian BBDB package.  My default flavor is
emacs-snapshot, so that /usr/bin/emacs -> /usr/bin/emacs-snapshot.

The problem is as follows.  When BBDB is installed, its autoloads are
generated only once, using I guess whatever Emacs flavor is installed
at /usr/bin/emacs.  From debian/emacsen-install:

        echo "Generating bbdb-autoloads" >> $LOG
	make autoloads >> $LOG 2>&1
	if [ $FLAVOR != xemacs20 -a $FLAVOR != xemacs21 ]; then
	    echo  "(provide 'bbdb-autoloads)" >> lisp/bbdb-autoloads.el
	fi

In my case then, the autoload file is generated and compiled by
emacs-snapshot and installed into /usr/share/emacs21/site-lisp.
This doesn't work, because autoloads generated by Emacs 22 cannot be
run by Emacs 21.  Specifically, Emacs 22 will put calls to
`custom-autoload', a function that is not defined in Emacs 21.
I don't know whether there are other incompatibilities as well.

On the other hand, Emacs 22 is backwards-compatible in this respect
and does understand autoloads created by Emacs 21, so I worked around
the problem by doing

    sudo update-alternatives --set emacs /usr/bin/emacs21-x
    sudo aptitude reinstall bbdb
    sudo update-alternatives --set emacs /usr/bin/emacs-snapshot-gtk

Presumably, there is a reason why Emacs 22 generates autoloads that
are different from those generated by earlier versions, so this
workaround is clearly a hack.  Indeed, what if Emacs 23 decides to
drop compatibility with older versions?

I'm sorry I can't be much more constructive than that of detailed
whining, but I really don't know how to go about fixing this.
I thought maybe someone would know about another package that
already DTRT in this respect, so we don't have to think so much.

Please let me know if you think I should file a bug about this.

-- 
Daniel Brockman <daniel@brockman.se>



Reply to: