2009-08-06 08:24:42 +00:00
|
|
|
;; Configure flymake for python
|
2008-04-14 15:56:00 +00:00
|
|
|
(when (load "flymake" t)
|
|
|
|
(defun flymake-pylint-init ()
|
|
|
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
2009-08-06 08:24:42 +00:00
|
|
|
'flymake-create-temp-inplace))
|
2008-04-14 15:56:00 +00:00
|
|
|
(local-file (file-relative-name
|
|
|
|
temp-file
|
|
|
|
(file-name-directory buffer-file-name))))
|
2009-08-31 05:59:47 +00:00
|
|
|
(list "epylint" (list local-file))))
|
|
|
|
|
2008-04-14 15:56:00 +00:00
|
|
|
(add-to-list 'flymake-allowed-file-name-masks
|
|
|
|
'("\\.py\\'" flymake-pylint-init)))
|
2009-08-06 08:24:42 +00:00
|
|
|
|
|
|
|
;; Set as a minor mode for python
|
|
|
|
(add-hook 'python-mode-hook '(lambda () (flymake-mode)))
|