[Top][All Lists]

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

Re: How to configure Emacs to autoload modes?

From: Lucas
Subject: Re: How to configure Emacs to autoload modes?
Date: Fri, 21 Feb 2003 10:42:20 +0100
User-agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-msvc-nt5.1.2600)

Un beau jour, "Peter Wu" <> nous a dit:

> I tried to build that support by updating the files.el and loaddefs.el but
> no luck. I opened the python-mode.el and M-x update-file-autoloads. I saw
> it wrote the loaddefs.el successfully. If I open that file, I do see the
> python-mode in it.
> Also, i tried to edit the files.el file, like this:
> (defvar auto-mode-alist
>   (mapc
>    (lambda (elt)
>      (cons (purecopy (car elt)) (cdr elt)))
>    '(("\\.te?xt\\'" . text-mode)
>      ("\\.c\\'" . c-mode)
>      ("\\.h\\'" . c-mode)
>      ("\\.py\\'" . python-mode)
> Am I on the right track?

I modified that list in my .emacs because I always fear of modifying
something directly in Emacs, but that should work too. This list is
huge, BTW ^^.

To do that in Emacs, simply :
(setq auto-mode-alist (append 
      '(("\\.ext1$" . mode-for-ext1)
        ("\\.ext2$" . mode-for-ext2)) auto-mode-alist))

But I'm sure you'll get the same result by editing files.el, with being
((((careful)) (to) '(((parenthesis))))) and "strings" that end anywhere".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]