From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lucas Newsgroups: gmane.emacs.help Subject: Re: How to configure Emacs to autoload modes? Date: Fri, 21 Feb 2003 10:42:20 +0100 Organization: Conteur Corp. Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045820841 2830 80.91.224.249 (21 Feb 2003 09:47:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2003 09:47:21 +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 18m9m2-0000jS-00 for ; Fri, 21 Feb 2003 10:47:18 +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 18m9kT-0007pI-04 for gnu-help-gnu-emacs@m.gmane.org; Fri, 21 Feb 2003 04:45:41 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!wanadoo.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: alyon-110-1-20-64.abo.wanadoo.fr Original-X-Trace: news-reader11.wanadoo.fr 1045820541 25043 81.50.174.64 (21 Feb 2003 09:42:21 GMT) Original-X-Complaints-To: abuse@wanadoo.fr Original-NNTP-Posting-Date: 21 Feb 2003 09:42:21 GMT User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-msvc-nt5.1.2600) Cancel-Lock: sha1:4SK1pv6Qe2IArjdrZHMi2xYDngA= Original-Xref: shelby.stanford.edu gnu.emacs.help:110466 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:6968 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6968 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". -- Lucas