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
commit9d616e90ae06214f7d6168fc49b4769a7f6611f3 (patch)
tree81e2158f5a4eb8849d0de82af3f2dadd8a6caec8 /elisp
parentff31c88e9f12355ed779c79455e7a8b0f2720ae5 (diff)
downloadpylint-9d616e90ae06214f7d6168fc49b4769a7f6611f3.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 835409e..df46867 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)))