aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorJuri Linkov2026-01-21 20:02:56 +0200
committerJuri Linkov2026-01-21 20:02:56 +0200
commit8063921808c85b9041beeccd9995003bd17bcb11 (patch)
treee26dbd83731416fd062db44113cd0d3f553a9a13 /lisp/progmodes/python.el
parent15d3cc3f65e8ea3bc1e1a4c766f439bcad012150 (diff)
downloademacs-8063921808c85b9041beeccd9995003bd17bcb11.tar.gz
emacs-8063921808c85b9041beeccd9995003bd17bcb11.zip
Fix down-list navigation in python-ts-mode
* lisp/progmodes/python.el (python-ts-mode): Set 'treesit-sexp-thing-down-list' to 'list' to override sexp navigation with list navigation (bug#72478). * lisp/emacs-lisp/lisp.el (up-list): Mention 'up-list-function' in docstring.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 848a26229e6..b6981c9156c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -7485,7 +7485,8 @@ implementations: `python-mode' and `python-ts-mode'."
7485 (treesit-major-mode-setup) 7485 (treesit-major-mode-setup)
7486 ;; Enable the `sexp' navigation by default 7486 ;; Enable the `sexp' navigation by default
7487 (setq-local forward-sexp-function #'treesit-forward-sexp 7487 (setq-local forward-sexp-function #'treesit-forward-sexp
7488 treesit-sexp-thing 'sexp) 7488 treesit-sexp-thing 'sexp
7489 treesit-sexp-thing-down-list 'list)
7489 7490
7490 (when (>= emacs-major-version 31) 7491 (when (>= emacs-major-version 31)
7491 (setq-local hs-treesit-things '(or defun sexp)) 7492 (setq-local hs-treesit-things '(or defun sexp))