]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename treesit-toggle-sexp-type to treesit-cycle-sexp-type.
authorJuri Linkov <juri@linkov.net>
Fri, 11 Apr 2025 16:34:29 +0000 (19:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 12 Apr 2025 06:35:04 +0000 (08:35 +0200)
* 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)

lisp/treesit.el

index 8c0fdd64253b767a1d213257cebbebeffcf7d0a6..1b011d173b50c1603902f1328b2fbbbab376e17c 100644 (file)
@@ -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"))))