[Top][All Lists]

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

How to configure Emacs to autoload modes?

From: Peter Wu
Subject: How to configure Emacs to autoload modes?
Date: 21 Feb 2003 13:44:30 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


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

reply via email to

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