]> git.rkrishnan.org Git - .emacs.d.git/blob - emacs/my-python.el
6dabf3de02c8d189756e8d6d2377862632191011
[.emacs.d.git] / emacs / my-python.el
1 (require 'ac-python)
2
3 ;;; Use python-mode with files with these extensions
4 (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
5 (add-to-list 'auto-mode-alist '("\\.pyx\\'" . python-mode))
6
7 ;;; Turn on auto-complete in python shells
8 (add-hook 'inferior-python-mode-hook (lambda () (auto-complete-mode 1)))
9
10 ;;; Use python major mode if 'python' is in hashbang.
11 (add-to-list 'interpreter-mode-alist '("python" . python-mode))
12
13 ;;; Use python as the python interpreter (can be changed to "ipython" in time
14 ;;; when it works)
15 (setq python-python-command "python")
16
17 ;;; Check files for pep8 mistakes
18 (autoload 'python-pep8 "python-pep8")
19 (autoload 'pep8 "python-pep8")