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 06:50:46 +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 1045807017 30537 80.91.224.249 (21 Feb 2003 05:56:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2003 05:56:57 +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 18m6B5-0007wO-00 for ; Fri, 21 Feb 2003 06:56:56 +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 18m69V-0003b6-09 for gnu-help-gnu-emacs@m.gmane.org; Fri, 21 Feb 2003 00:55:17 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!wanadoo.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: alyon-110-1-20-64.abo.wanadoo.fr Original-X-Trace: news-reader11.wanadoo.fr 1045806644 1215 81.50.174.64 (21 Feb 2003 05:50:44 GMT) Original-X-Complaints-To: abuse@wanadoo.fr Original-NNTP-Posting-Date: 21 Feb 2003 05:50:44 GMT User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-msvc-nt5.1.2600) Cancel-Lock: sha1:4+KOLQlFWBL15G1ZjlMuF25q4mU= Original-Xref: shelby.stanford.edu gnu.emacs.help:110461 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:6963 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6963 Un beau jour, Peter Wu nous a dit: > Hello, > > I downloaded the python-mode.el to lisp dir and did the byte-compile-file > successsfully. I need to add the following line in my .emacs file so that > when I open or new a Python file, Emacs will load the python-mode for me. > > ;; Load python-mode > (autoload 'python-mode "python-mode" "Python editing mode" t) > (setq auto-mode-alist (append '(("\\.py$" . python-mode)) auto-mode-alist)) > > However, I notice that if I create a XML or Perl file, I don't need to add > some similar code in the .emacs file and Emacs can do the job correctly. I > think there must be some settings that configure Emacs to offer such > functionality. Can anyone show me how to do this? Thanks! I think that it's because Emacs knows some modes and extensions natively (it's the same thing for C, and others). It is built with that support, maybe you can rebuild Emacs to natively add support to Python ? Or am I totally wrong ? ^^ -- Lucas