summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2009-08-06 10:24:42 +0200
committerSylvain Thénault <sylvain.thenault@logilab.fr>2009-08-06 10:24:42 +0200
commit6a770636cfec2491c47e42079231496399cd8cad (patch)
treea10364250992194fbecdb56b737387fef706b7e5 /elisp
parenta3345ecaf804122f92fa9439077f71d5d0087a63 (diff)
downloadpylint-git-6a770636cfec2491c47e42079231496399cd8cad.tar.gz
improved flymake code and doc provided by Derek Harland
Diffstat (limited to 'elisp')
-rw-r--r--elisp/pylint-flymake.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/elisp/pylint-flymake.el b/elisp/pylint-flymake.el
index 835409ea3..df4686711 100644
--- a/elisp/pylint-flymake.el
+++ b/elisp/pylint-flymake.el
@@ -1,11 +1,16 @@
+
+;; Configure flymake for python
+(setq pylint "epylint")
(when (load "flymake" t)
(defun flymake-pylint-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-inplace))
+ 'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
- (list "epylint" (list local-file))))
-
+ (list (expand-file-name pylint "") (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pylint-init)))
+
+;; Set as a minor mode for python
+(add-hook 'python-mode-hook '(lambda () (flymake-mode)))