]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename treesit-add-simple-indent-rules
authorYuan Fu <casouri@gmail.com>
Mon, 17 Feb 2025 21:29:46 +0000 (13:29 -0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 18 Feb 2025 08:54:17 +0000 (09:54 +0100)
* lisp/treesit.el (treesit-add-simple-indent-rules): Rename to
treesit-simple-indent-add-rules.
* etc/NEWS: Update.
* test/src/treesit-tests.el:
(treesit-test-simple-indent-add-rules): Update accordingly.

(cherry picked from commit 237afc82b2ed147fe6b1773df303c448ded9679b)

lisp/treesit.el
test/src/treesit-tests.el

index de9d963d7f68952613c955cfff3f6ff0700b0f51..02170d34f29de95fb1b68628402fc1b69ad15cfc 100644 (file)
@@ -2500,7 +2500,7 @@ RULES."
                             offset)))))
              (cons lang (mapcar #'optimize-rule indent-rules)))))
 
-(defun treesit-add-simple-indent-rules (language rules &optional where anchor)
+(defun treesit-simple-indent-add-rules (language rules &optional where anchor)
   "Add simple indent RULES for LANGUAGE.
 
 This function only affects `treesit-simple-indent-rules',
index 11536d56c1936a66cf2b63db05a193e7b4e22f36..9bf07677ab2ce0292ca546e0f69cc07feaeb6e6f 100644 (file)
@@ -413,21 +413,21 @@ BODY is the test body."
 
 ;;; Indent
 
-(ert-deftest treesit-test-add-simple-indent-rules ()
+(ert-deftest treesit-test-simple-indent-add-rules ()
   "Test `treesit-add-simple-indent-rules'."
   (let ((treesit-simple-indent-rules
          (copy-tree '((c (a a a) (b b b) (c c c))))))
-    (treesit-add-simple-indent-rules 'c '((d d d)))
+    (treesit-simple-indent-add-rules 'c '((d d d)))
     (should (equal treesit-simple-indent-rules
                    '((c (d d d) (a a a) (b b b) (c c c)))))
-    (treesit-add-simple-indent-rules 'c '((e e e)) :after)
+    (treesit-simple-indent-add-rules 'c '((e e e)) :after)
     (should (equal treesit-simple-indent-rules
                    '((c (d d d) (a a a) (b b b) (c c c) (e e e)))))
-    (treesit-add-simple-indent-rules 'c '((f f f)) :after '(b b b))
+    (treesit-simple-indent-add-rules 'c '((f f f)) :after '(b b b))
     (should (equal treesit-simple-indent-rules
                    '((c (d d d) (a a a) (b b b) (f f f)
                         (c c c) (e e e)))))
-    (treesit-add-simple-indent-rules 'c '((g g g)) :before '(b b b))
+    (treesit-simple-indent-add-rules 'c '((g g g)) :before '(b b b))
     (should (equal treesit-simple-indent-rules
                    '((c (d d d) (a a a) (g g g)
                         (b b b) (f f f) (c c c) (e e e)))))))