python-mode on OS X

Piet van Oostrum piet at cs.uu.nl
Sat Jun 14 17:08:34 EDT 2003


>>>>> spam at fisher.forestry.uga.edu (Chris Fonnesbeck) (CF) wrote:

CF> Here is my .emacs:

CF> (custom-set-variables
CF>   ;; custom-set-variables was added by Custom.
CF>   ;; If you edit it by hand, you could mess it up, so be careful.
CF>   ;; Your init file should contain only one such instance.
CF>   ;; If there is more than one, they won't work right.
CF>   (setq auto-mode-alist
CF>       (cons '("\\.py$" . python-mode) auto-mode-alist))
CF>   (setq interpreter-mode-alist
CF>       (cons '("python" . python-mode)
CF>             interpreter-mode-alist))
CF>   (autoload 'python-mode "python-mode" "Python editing mode" t))

That's wrong. This code should be placed outside of the custom-code.

(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 editing mode" t)
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
)
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

As the custom stuff is empty it could even be deleted. But it will be
added at the next customization.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl




More information about the Python-list mailing list