Improve flymake
This commit is contained in:
parent
a8e19183cd
commit
7fa0a2e65d
3 changed files with 182 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue