From: Juri Linkov Date: Fri, 11 Apr 2025 16:34:29 +0000 (+0300) Subject: Rename treesit-toggle-sexp-type to treesit-cycle-sexp-type. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a7cc8732d8e09ea16a180436fba6ea142c755067;p=emacs.git Rename treesit-toggle-sexp-type to treesit-cycle-sexp-type. * lisp/treesit.el (treesit-cycle-sexp-type): Rename from 'treesit-toggle-sexp-type'. Fix docstring. https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00291.html (cherry picked from commit 695edc5b55bec645fe2df8924513826b202022b6) --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 8c0fdd64253..1b011d173b5 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -3188,11 +3188,10 @@ ARG is described in the docstring of `up-list'." (user-error "At top level"))) (setq cnt (- cnt inc))))) -(defun treesit-toggle-sexp-type () - "Toggle the type of navigation for sexp and list commands. -This type toggle affects navigation commands such as -`treesit-forward-sexp', `treesit-forward-list', `treesit-down-list', -`treesit-up-list'. +(defun treesit-cycle-sexp-type () + "Cycle the type of navigation for sexp and list commands. +This type affects navigation commands such as `treesit-forward-sexp', +`treesit-forward-list', `treesit-down-list', `treesit-up-list'. The type can be `list' (the default) or `sexp'. @@ -3216,7 +3215,7 @@ without distinction between symbols and lists." (if treesit-sexp-type-regexp #'treesit-forward-sexp #'treesit-forward-sexp-list)) - (message "Toggle sexp type to navigate %s" + (message "Cycle sexp type to navigate %s" (or (and treesit-sexp-type-regexp "treesit nodes") "syntax symbols and treesit lists"))))