[Top][All Lists]

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

Re: How to configure Emacs to autoload modes?

From: Peter Wu
Subject: Re: How to configure Emacs to autoload modes?
Date: Fri, 21 Feb 2003 17:50:36 +0800

Lucas wrote:

> 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))

Yes. This method works.

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

However, it does not work for me after I modified the files.el and
loaddefs.el. What could I have missed? Thanks!

Cheers, Peter

reply via email to

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