]> git.eshelyaron.com Git - emacs.git/commitdiff
python-check-command: Don't use absolute file names
authorAugusto Stoffel <arstoffel@gmail.com>
Sat, 13 Aug 2022 15:04:17 +0000 (17:04 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Fri, 19 Aug 2022 12:59:27 +0000 (14:59 +0200)
Absolute executable file names are incompatible with Tramp and
packages that switch between virtualenvs.

* lisp/progmodes/python.el (python-check-command): Don't use absolute
file names.  (Bug#53913)

lisp/progmodes/python.el

index 9a2d17abb4a9905cfc3dd249a3ca9acc61991607..285a57348e001f8dd7594d96355367e26615527d 100644 (file)
@@ -4724,11 +4724,12 @@ def __FFAP_get_module_path(objstr):
 ;;; Code check
 
 (defcustom python-check-command
-  (or (executable-find "pyflakes")
-      (executable-find "epylint")
-      "install pyflakes, pylint or something else")
+  (cond ((executable-find "pyflakes") "pyflakes")
+        ((executable-find "epylint") "epylint")
+        (t "pyflakes"))
   "Command used to check a Python file."
-  :type 'string)
+  :type 'string
+  :version "29.1")
 
 (defcustom python-check-buffer-name
   "*Python check: %s*"