Skip to content

Commit

Permalink
Installed PyFlakes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bojan Mihelac committed Feb 24, 2010
1 parent d4a96d5 commit ff642fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bmihelac.el
Expand Up @@ -12,3 +12,15 @@
(require 'sr-speedbar)
(global-set-key (kbd "s-s") 'sr-speedbar-toggle)

(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 'python-mode-hook 'flymake-mode)

0 comments on commit ff642fd

Please sign in to comment.