[moved to xemacs-beta]
On Mon, 2002-11-04 at 20:45, Martin Stjernholm wrote:
> Allrighty, here's the packages part of the "move
auto-mode-alist and
> interpreter-mode-alist associations from core to packages" for
> applicable modes.
[...]
Marcelo Matus has noted a problem with this approach when a package
is
loaded where the entry isn't equal to any already on auto-mode-alist
(can e.g. happen when another version of the package than the one
distributed with XEmacs is installed): add-to-list will then add the
entry, and it will do that to the beginning of auto-mode-alist which
causes it to override any user settings that has been made before the
package is loaded.
True.
A fix for this would be to append the new entries to the end of
auto-mode-alist instead, e.g:
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode) t)
This will work with Emacs 21 and XEmacs in the cvs since add-to-list
has gotten the third APPEND argument there. To make it work with older
(X)Emacsen, the package maintainer can add something like this:
[...]
Yep, you're right, the APPEND argument would be better, unfortunately it
cannot be used in XEmacs packages at the moment because of the backwards
compatibility stuff you already mentioned. And I wouldn't like to see
too big workarounds for this in every package.
Your suggestion would be a good candidate to the (yet unstarted)
forward-compat package. Or we could try to make sure these *-mode-alist
associations are only used for generating package autoloads, and not
evaluated when loading the file. I don't know how to do that, though.
Ideas?
--
\/ille Skyttä
scop at
xemacs.org