forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-python-mode.el
36 lines (26 loc) · 1.16 KB
/
init-python-mode.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(autoload 'python-mode "python-mode" "Python editing mode." t)
(autoload 'doctest-mode "doctest-mode" "Python doctest editing mode." t)
(setq auto-mode-alist
(append '(("\\.py$" . python-mode)
("SConstruct$" . python-mode)
("SConscript$" . python-mode))
auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python" . python-mode) interpreter-mode-alist))
;;----------------------------------------------------------------------------
;; Pymacs and Rope for Python
;;----------------------------------------------------------------------------
;; See http://edward.oconnor.cx/2008/02/ropemacs
(setq pymacs-load-path
(list (concat el-get-dir "ropemacs")))
(add-hook 'python-mode-hook
(lambda ()
(require 'pymacs)
(pymacs-load "ropemacs" "rope-")))
;;----------------------------------------------------------------------------
;; On-the-fly syntax checking via flymake
;;----------------------------------------------------------------------------
(setq flymake-python-pyflakes-executable "pyflakes-2.6")
(require 'flymake-python)
(add-hook 'python-mode-hook 'flymake-python-load)
(provide 'init-python-mode)