From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Peter Wu" Newsgroups: gmane.emacs.help Subject: Re: How to configure Emacs to autoload modes? Date: Fri, 21 Feb 2003 17:50:36 +0800 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1045821420 4708 80.91.224.249 (21 Feb 2003 09:57:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2003 09:57:00 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18m9vO-0001Db-00 for ; Fri, 21 Feb 2003 10:56:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18m9tv-0001v3-0C for gnu-help-gnu-emacs@m.gmane.org; Fri, 21 Feb 2003 04:55:27 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!tide121.microsoft.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 45 Original-NNTP-Posting-Host: tide121.microsoft.com (207.46.71.13) Original-X-Trace: fu-berlin.de 1045821115 51783469 207.46.71.13 (16 [117651]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-Xref: shelby.stanford.edu gnu.emacs.help:110467 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6969 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6969 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