aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorYuan Fu2022-11-20 20:43:15 -0800
committerYuan Fu2022-11-21 01:29:32 -0800
commit1e624452004e17bec2070b0c0b9f5639f66df1f8 (patch)
tree99a81ee4e6dc6a878a62fa5378123489940e568e /lisp/progmodes/python.el
parent3f25b22cadc9f73583e83b00f828ee00efa8764e (diff)
downloademacs-1e624452004e17bec2070b0c0b9f5639f66df1f8.tar.gz
emacs-1e624452004e17bec2070b0c0b9f5639f66df1f8.zip
Add separate keymaps for js/python/css-ts-mode
* lisp/progmodes/js.el (js-ts-mode-map) * lisp/progmodes/python.el (python-ts-mode-map) * lisp/textmodes/css-mode.el (css-ts-mode-map): New keymap.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d38d0292775..c9a69a924e0 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -396,6 +396,9 @@ instead."
396 map) 396 map)
397 "Keymap for `python-mode'.") 397 "Keymap for `python-mode'.")
398 398
399(defvar python-ts-mode-map (copy-keymap python-mode-map)
400 "Keymap for `(copy-keymap python-mode-map)'.")
401
399 402
400;;; Python specialized rx 403;;; Python specialized rx
401 404
@@ -6597,7 +6600,7 @@ implementations: `python-mode' and `python-ts-mode'."
6597(define-derived-mode python-ts-mode python-base-mode "Python" 6600(define-derived-mode python-ts-mode python-base-mode "Python"
6598 "Major mode for editing Python files, using tree-sitter library. 6601 "Major mode for editing Python files, using tree-sitter library.
6599 6602
6600\\{python-mode-map}" 6603\\{python-ts-mode-map}"
6601 (when (treesit-ready-p 'python) 6604 (when (treesit-ready-p 'python)
6602 (treesit-parser-create 'python) 6605 (treesit-parser-create 'python)
6603 (setq-local treesit-font-lock-feature-list 6606 (setq-local treesit-font-lock-feature-list