From: Stefan Kangas Date: Thu, 11 Jul 2019 03:51:18 +0000 (+0200) Subject: Use "python -m pdb" when "pdb" is missing in M-x pdb X-Git-Tag: emacs-27.0.90~1665 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0428d0e96be41686858b030eeb4ff27f52822566;p=emacs.git Use "python -m pdb" when "pdb" is missing in M-x pdb * lisp/progmodes/gud.el (gud-pdb-command-name): Use "python -m pdb" when "pdb" is missing. (Bug#21521) --- diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index b6a4ad3cd0c..30d4b199110 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1673,9 +1673,10 @@ and source-file directory for your debugger." output)) -(defcustom gud-pdb-command-name "pdb" - "File name for executing the Python debugger. -This should be an executable on your path, or an absolute file name." +(defcustom gud-pdb-command-name + (if (executable-find "pdb") "pdb" "python -m pdb") + "Command that executes the Python debugger." + :version "27.1" :type 'string :group 'gud)