unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Emacs python-mode
@ 2006-07-05  1:59 Kevin Harriss
  2006-07-06  6:28 ` Edward O'Connor
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Harriss @ 2006-07-05  1:59 UTC (permalink / raw)


I am trying to setup python mode in emacs21 for linux.  I have
python-mode.el, pycomplete.el, and doctest-mode.el in ~/elisp.  In
my .emacs I have the following lines:

(add-to-list 'load-path "~/elisp")
(autoload 'python-mode "python-mode" "Python mode" t)
(setq auto-mode-alist (append '(("\\.py$" python-mode))
 auto-mode-alist))

Whenever I open emacs I get this error File mode specification error:
(invalid-function (python-mode)).

Thanks in advance,

Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Emacs python-mode
  2006-07-05  1:59 Emacs python-mode Kevin Harriss
@ 2006-07-06  6:28 ` Edward O'Connor
  0 siblings, 0 replies; 2+ messages in thread
From: Edward O'Connor @ 2006-07-06  6:28 UTC (permalink / raw)


Kevin Harriss wrote:

> Whenever I open emacs I get this error File mode specification error:
> (invalid-function (python-mode)).

Your error is here, where you frob `auto-mode-alist':

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

>From C-h f auto-mode-alist RET:

> Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL)

("\\.py$" python-mode) looks like (REGEXP FUNCTION), not (REGEXP . FUNCTION).

Try ("\\.py$" . python-mode) instead.


Ted

-- 
Edward O'Connor
hober0@gmail.com

Ense petit placidam sub libertate quietem.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-06  6:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-05  1:59 Emacs python-mode Kevin Harriss
2006-07-06  6:28 ` Edward O'Connor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).