Improve flymake

This commit is contained in:
nemunaire 2015-10-30 14:13:19 +01:00
commit 7fa0a2e65d
3 changed files with 182 additions and 0 deletions

View file

@ -34,3 +34,17 @@
;; Markdown-mode
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
;; Python-mode
(when (load "flymake" t)
(defun flymake-pyflakes-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 "pyflakes" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
(add-hook 'find-file-hook 'flymake-find-file-hook)