]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename treesit-toggle-sexp-mode to treesit-toggle-sexp-type.
authorJuri Linkov <juri@linkov.net>
Thu, 10 Apr 2025 16:04:12 +0000 (19:04 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 11 Apr 2025 11:36:28 +0000 (13:36 +0200)
* lisp/treesit.el (treesit-toggle-sexp-type):
Rename from 'treesit-toggle-sexp-mode'.  Fix docstring.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00273.html

(cherry picked from commit addcab68918a2dbbff997642e1287bd309a741bc)

lisp/treesit.el

index cbecaf096350a7503f87f8d42e3b86eda25d9269..1270c197111fd9b387b5463cfb7d32c1186fdb05 100644 (file)
@@ -3180,20 +3180,20 @@ ARG is described in the docstring of `up-list'."
             (user-error "At top level")))
       (setq cnt (- cnt inc)))))
 
-(defun treesit-toggle-sexp-mode ()
-  "Toggle the mode of navigation for sexp and list commands.
-This mode toggle affects navigation commands such as
+(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'.
 
-The mode can be `list' (the default) or `sexp'.
+The type can be `list' (the default) or `sexp'.
 
-The `list' mode uses the `list' thing defined in `treesit-thing-settings'.
-See `treesit-thing-at-point'.  In this mode commands use syntax tables to
+The `list' type uses the `list' thing defined in `treesit-thing-settings'.
+See `treesit-thing-at-point'.  With this type commands use syntax tables to
 navigate symbols and treesit definition to navigate lists.
 
-The `sexp' mode uses the `sexp' thing defined in `treesit-thing-settings'.
-In this mode commands use only the treesit definition of parser nodes,
+The `sexp' type uses the `sexp' thing defined in `treesit-thing-settings'.
+With this type commands use only the treesit definition of parser nodes,
 without distinction between symbols and lists."
   (interactive)
   (if (not (treesit-thing-defined-p 'list (treesit-language-at (point))))
@@ -3208,7 +3208,7 @@ without distinction between symbols and lists."
                 (if treesit-sexp-type-regexp
                     #'treesit-forward-sexp
                   #'treesit-forward-sexp-list))
-    (message "Toggle to mode where sexp commands navigate %s"
+    (message "Toggle sexp type to navigate %s"
              (or (and treesit-sexp-type-regexp
                       "treesit nodes")
                  "syntax symbols and treesit lists"))))