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).
This commit is contained in:
parent
1e57b2b4c7
commit
d879847cd4
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue