Py-Mode on GNU Emacs?

Thomas A. Bryan tbryan at python.net
Sun Feb 13 11:12:14 EST 2000


J Donald wrote:
> 
> Has anyone successfully gotten py-mode to work in GNU Emacs? If so, can
> you share the recipe?
> 
> It appears to be written for X-Emacs and I get error messages when I try
> to use it with the GNU version
> (running on Red Hat Linux 6.0).
> 
> Thanks,
> 
> -jd

I have no problems in Emacs 20.3.1 (on Red Hat Linux 6.0).

Python mode is on my system (version 3.28):

$ locate python-mode.el
/usr/share/emacs/site-lisp/python-mode.el
/usr/share/emacs/site-lisp/python-mode.elc

Here are the relevant lines from my .emacs file.

;;; For Python mode
(setq auto-mode-alist
      (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
      (cons '("python" . python-mode)
            interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python hacking mode." t)
(defun my-python-mode-hook ()
  ;; make sure that emacs uses only spaces for indentation
  (setq-default indent-tabs-mode nil)
  )
(add-hook 'python-mode-hook 'my-python-mode-hook)

(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)



More information about the Python-list mailing list