third_party.pylibs.pylint.src/elisp/pylint-flymake.el
2009-08-06 10:24:42 +02:00

17 lines
624 B
EmacsLisp

;; 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))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(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)))