python.el: Use correct regexp when enabling python-ts-mode

* lisp/progmodes/python.el: Use "python[0-9.]*" regexp for
'interpreter-mode-alist', and not 'auto-mode-alist'.  (Bug#61090)
This commit is contained in:
Brian Leung 2023-01-26 17:36:42 -08:00 committed by Eli Zaretskii
parent 76bb46db9d
commit 362678d90e

View file

@ -6715,8 +6715,8 @@ implementations: `python-mode' and `python-ts-mode'."
(when python-indent-guess-indent-offset
(python-indent-guess-indent-offset))
(add-to-list 'auto-mode-alist
'("\\.py[iw]?\\'\\|python[0-9.]*" . python-ts-mode))))
(add-to-list 'auto-mode-alist '("\\.py[iw]?\\'" . python-ts-mode))
(add-to-list 'interpreter-mode-alist '("python[0-9.]*" . python-ts-mode))))
;;; Completion predicates for M-x
;; Commands that only make sense when editing Python code