>From 73d2c15d3813629a51046e115768b6fb1c141733 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Thu, 26 Jan 2023 17:36:42 -0800 Subject: [PATCH] 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. --- 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 a869cdc5fdb..df0d1c96965 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -6715,8 +6715,8 @@ 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 -- 2.39.0