Problem in installing python-mode.el

David Bolen db3l at fitlinxx.com
Sat Aug 19 22:55:39 EDT 2000


zhangy at yuma.Princeton.EDU (Yu Zhang) writes:

> Hi,
> I downloaded the python-mode.el and did the compiliation
> and installation according to the guide on the www.python.org
> site. However each time I load  "*.py" file, emacs complains
> 
> "File mode specification error: (void function python-mode)" 

Have you included the following in your .emacs (or a site file, or via
some other means already loaded the python-mode file?):

(autoload 'python-mode "python-mode" "Python editing mode." t)

If not, try adding that into your .emacs file.  I'm presuming you
already have the appropriate auto-mode setup, e.g.:

(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))

or that your emacs has it for you, but that just associates the file
extension with the function to call - it doesn't do anything special
to make sure that the function is currently loaded and available
(which the autoload definition does).

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list