From d879847cd4daaeef792384475dd31a3dcfc14184 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 17 May 2023 13:48:09 +0100 Subject: [PATCH] Fix M-x completion-predicate under python-ts-mode * lisp/progmodes/python.el (python--completion-predicate) (python-shell--completion-predicate): Filter M-x completion based on python-base-mode instead of python-mode. This allows for python-ts-mode as well (bug#63552). --- lisp/progmodes/python.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index bbabce80b4d..f810f1e2164 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4967,7 +4967,7 @@ the if condition." (defun python--completion-predicate (_ buffer) (provided-mode-derived-p (buffer-local-value 'major-mode buffer) - 'python-mode)) + 'python-base-mode)) (defmacro python-skeleton-define (name doc &rest skel) "Define a `python-mode' skeleton using NAME DOC and SKEL. @@ -6791,7 +6791,7 @@ implementations: `python-mode' and `python-ts-mode'." (defun python-shell--completion-predicate (_ buffer) (provided-mode-derived-p (buffer-local-value 'major-mode buffer) - 'python-mode 'inferior-python-mode)) + 'python-base-mode 'inferior-python-mode)) ;; Commands that only make sense in the Python shell or when editing ;; Python code. -- 2.39.2