diff options
| author | Basil L. Contovounesios | 2023-05-17 13:48:09 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2023-05-17 15:14:09 +0100 |
| commit | d879847cd4daaeef792384475dd31a3dcfc14184 (patch) | |
| tree | 2e00cbddb0cc2c40ab0b31153bc76540025cb9aa /lisp/progmodes/python.el | |
| parent | 1e57b2b4c79ada7592c0a7e3f700e7c30dd76a4b (diff) | |
| download | emacs-d879847cd4daaeef792384475dd31a3dcfc14184.tar.gz emacs-d879847cd4daaeef792384475dd31a3dcfc14184.zip | |
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).
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 4 |
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." | |||
| 4967 | (defun python--completion-predicate (_ buffer) | 4967 | (defun python--completion-predicate (_ buffer) |
| 4968 | (provided-mode-derived-p | 4968 | (provided-mode-derived-p |
| 4969 | (buffer-local-value 'major-mode buffer) | 4969 | (buffer-local-value 'major-mode buffer) |
| 4970 | 'python-mode)) | 4970 | 'python-base-mode)) |
| 4971 | 4971 | ||
| 4972 | (defmacro python-skeleton-define (name doc &rest skel) | 4972 | (defmacro python-skeleton-define (name doc &rest skel) |
| 4973 | "Define a `python-mode' skeleton using NAME DOC and SKEL. | 4973 | "Define a `python-mode' skeleton using NAME DOC and SKEL. |
| @@ -6791,7 +6791,7 @@ implementations: `python-mode' and `python-ts-mode'." | |||
| 6791 | (defun python-shell--completion-predicate (_ buffer) | 6791 | (defun python-shell--completion-predicate (_ buffer) |
| 6792 | (provided-mode-derived-p | 6792 | (provided-mode-derived-p |
| 6793 | (buffer-local-value 'major-mode buffer) | 6793 | (buffer-local-value 'major-mode buffer) |
| 6794 | 'python-mode 'inferior-python-mode)) | 6794 | 'python-base-mode 'inferior-python-mode)) |
| 6795 | 6795 | ||
| 6796 | ;; Commands that only make sense in the Python shell or when editing | 6796 | ;; Commands that only make sense in the Python shell or when editing |
| 6797 | ;; Python code. | 6797 | ;; Python code. |