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: How to configure Emacs to autoload modes? Date: 21 Feb 2003 13:44:30 +0800 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045806388 29116 80.91.224.249 (21 Feb 2003 05:46:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2003 05:46:28 +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 18m60x-0007ZU-00 for ; Fri, 21 Feb 2003 06:46:27 +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 18m602-0004bO-02 for gnu-help-gnu-emacs@m.gmane.org; Fri, 21 Feb 2003 00:45:30 -0500 Original-Newsgroups: gnu.emacs.help Original-Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: alvinzh.fareast.corp.microsoft.com X-Original-NNTP-Posting-Host: alvinzh.fareast.corp.microsoft.com Original-X-Trace: news.microsoft.com 1045806271 157.60.68.97 (20 Feb 2003 21:44:31 -0800) Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!sea-feed.news.verio.net!news.microsoft.com!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:110460 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:6962 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6962 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! -- Peter Wu