From ec347aec0fc7d2d3e6603b6694d9978cb9fcb9e9 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Sat, 13 Aug 2022 17:04:17 +0200 Subject: [PATCH] python-check-command: Don't use absolute file names 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9a2d17abb4a..285a57348e0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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*" -- 2.39.2