]> git.eshelyaron.com Git - emacs.git/commitdiff
Enhancements on python-check command.
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:34 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:34 +0000 (00:03 -0300)
Use pyflakes (PyChecker is dead) and run the process respecting
virtualenv rules.

lisp/progmodes/python.el

index def6d8bba94b4bf19b95c64f940e48c36566d07c..5406d74f69e3657db42b35194fd765c10e44137e 100644 (file)
@@ -2144,7 +2144,7 @@ The skeleton will be bound to python-skeleton-NAME."
 ;;; Code check
 
 (defcustom python-check-command
-  "pychecker --stdlib"
+  "pyflakes"
   "Command used to check a Python file."
   :type 'string
   :group 'python)
@@ -2168,7 +2168,9 @@ Runs COMMAND, a shell command, as if by `compile'.  See
                                     "")))))))
   (setq python-check-custom-command command)
   (save-some-buffers (not compilation-ask-about-save) nil)
-  (compilation-start command))
+  (let ((process-environment (python-shell-calculate-process-environment))
+        (exec-path (python-shell-calculate-exec-path)))
+    (compilation-start command)))
 
 \f
 ;;; Eldoc