summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2023-05-17 13:48:09 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2023-05-17 15:14:09 +0100
commitd879847cd4daaeef792384475dd31a3dcfc14184 (patch)
tree2e00cbddb0cc2c40ab0b31153bc76540025cb9aa
parent1e57b2b4c79ada7592c0a7e3f700e7c30dd76a4b (diff)
downloademacs-29.tar.gz
Fix M-x completion-predicate under python-ts-modeemacs-29
* 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).
-rw-r--r--lisp/progmodes/python.el4
1 files 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.