aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Monnier2024-03-08 12:58:11 -0500
committerStefan Monnier2024-03-09 10:29:06 -0500
commitc79a509384d33dab6a964ef9a97cbc9a1f1b5bf7 (patch)
treeb6518e969f94376989e2eeda740c550b3e52ef8e /lisp/progmodes/python.el
parent454a55dbd963d4b07c0dc0f6d540cc5fd4b4faa7 (diff)
downloademacs-c79a509384d33dab6a964ef9a97cbc9a1f1b5bf7.tar.gz
emacs-c79a509384d33dab6a964ef9a97cbc9a1f1b5bf7.zip
Add non-TS modes as extra parent of TS modes (bug#68246)
Record the fact that TS modes are alternatives to the non-TS modes using the new `derived-mode-add-parents` functionality. Do the same for long standing similar issues with CPerl-mode. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): * lisp/textmodes/css-mode.el (css-ts-mode): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode, tsx-ts-mode): * lisp/progmodes/sh-script.el (bash-ts-mode): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/python.el (python-ts-mode): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): * lisp/progmodes/json-ts-mode.el (json-ts-mode): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/java-ts-mode.el (java-ts-mode): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): * lisp/progmodes/go-ts-mode.el (go-ts-mode, go-mod-ts-mode): * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode): * lisp/progmodes/csharp-mode.el (csharp-ts-mode): * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): * lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Add non-TS mode as extra parent. * lisp/progmodes/cperl-mode.el (cperl-mode): Add `perl-mode` as extra parent.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index bedc61408ef..1016655cb62 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -7128,6 +7128,8 @@ implementations: `python-mode' and `python-ts-mode'."
7128 (add-to-list 'auto-mode-alist '("\\.py[iw]?\\'" . python-ts-mode)) 7128 (add-to-list 'auto-mode-alist '("\\.py[iw]?\\'" . python-ts-mode))
7129 (add-to-list 'interpreter-mode-alist '("python[0-9.]*" . python-ts-mode)))) 7129 (add-to-list 'interpreter-mode-alist '("python[0-9.]*" . python-ts-mode))))
7130 7130
7131(derived-mode-add-parents 'python-ts-mode '(python-mode))
7132
7131;;; Completion predicates for M-x 7133;;; Completion predicates for M-x
7132;; Commands that only make sense when editing Python code. 7134;; Commands that only make sense when editing Python code.
7133(dolist (sym '(python-add-import 7135(dolist (sym '(python-add-import