diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2009-08-06 10:24:42 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2009-08-06 10:24:42 +0200 |
commit | 9d616e90ae06214f7d6168fc49b4769a7f6611f3 (patch) | |
tree | 81e2158f5a4eb8849d0de82af3f2dadd8a6caec8 /elisp | |
parent | ff31c88e9f12355ed779c79455e7a8b0f2720ae5 (diff) | |
download | pylint-9d616e90ae06214f7d6168fc49b4769a7f6611f3.tar.gz |
improved flymake code and doc provided by Derek Harland
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/pylint-flymake.el | 11 |
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))) |