Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

flymake-warning-re: Set in buffer initialization function.

This is a buffer-local variable. Setting it in the variable
initialization function does not make all that much sense. Set
it in the buffer initialization function.
  • Loading branch information...
1 parent 5d057bc commit 766f13731677375d4bcfa9464f3565ab9dfa0510 @jorgenschaefer committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 elpy.el
7 elpy.el
@@ -285,7 +285,6 @@ using (defalias 'elpy-initialize-variables 'identity)"
;; Flymake support using flake8, including warning faces.
(when (executable-find "flake8")
- (set (make-local-variable 'flymake-warning-re) "^W[0-9]")
(setq python-check-command "flake8"))
;; `flymake-no-changes-timeout': The original value of 0.5 is too
@@ -343,7 +342,11 @@ using (defalias 'elpy-initialize-variables 'identity)"
This should be run from `python-mode-hook'."
;; Set `forward-sexp-function' to nil in python-mode. See
- (setq forward-sexp-function nil))
+ (setq forward-sexp-function nil)
+ ;; Enable warning faces for flake8 output.
+ (when (string-match "flake8" python-check-command)
+ (set (make-local-variable 'flymake-warning-re) "^W[0-9]"))
+ )
(defvar elpy-project-root 'not-initialized
"The root of the project the current buffer is in.")

0 comments on commit 766f137

Please sign in to comment.
Something went wrong with that request. Please try again.