emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 d879847cd4d: Fix M-x completion-predicate under python-ts-mode


From: Basil L. Contovounesios
Subject: emacs-29 d879847cd4d: Fix M-x completion-predicate under python-ts-mode
Date: Wed, 17 May 2023 10:14:17 -0400 (EDT)

branch: emacs-29
commit d879847cd4daaeef792384475dd31a3dcfc14184
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]