Skip to content

Instantly share code, notes, and snippets.

@brianloveswords
Forked from paulosman/.emacs
Created June 7, 2011 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianloveswords/1013202 to your computer and use it in GitHub Desktop.
Save brianloveswords/1013202 to your computer and use it in GitHub Desktop.
Shell script that runs pyflakes and pep8
(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 "pychecker.sh" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
(add-hook 'find-file-hook 'flymake-find-file-hook)
(global-set-key [f12] 'flymake-display-err-menu-for-current-line)
#!/bin/bash
/usr/local/bin/pyflakes $1
/usr/bin/pep8 --repeat $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment