4 Nov 2002 19:45
Re: [PATCH] [packages] Move filename and interpreter associations to packages
Martin Stjernholm <mast <at> lysator.liu.se>
2002-11-04 18:45:28 GMT
2002-11-04 18:45:28 GMT
Ville Skyttä <ville.skytta <at> xemacs.org> 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.
/.../
> diff -a -u -r1.9 cc-mode.el
> --- cc-mode/cc-mode.el 2001/02/28 07:38:17 1.9
> +++ cc-mode/cc-mode.el 2002/09/22 17:23:52
> <at> <at> -906,5 +906,23 <at> <at>
> )))))))
>
>
> +;; XEmacs additions
> +;;;###autoload
> +(add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))
/.../
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.
A fix for this would be to append the new entries to the end of
auto-mode-alist instead, e.g:
;;;###autoload
(Continue reading)
RSS Feed