]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix standalone-parent preset for tree-sitter
authorYuan Fu <casouri@gmail.com>
Fri, 14 Feb 2025 04:30:09 +0000 (20:30 -0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 14 Feb 2025 11:44:22 +0000 (12:44 +0100)
* lisp/treesit.el (treesit-simple-indent-presets): Fix typo.

(cherry picked from commit adabee88730017e81bbb0ee761b6720fd579535d)

lisp/treesit.el

index 23daeee8036346e319843f6bf8bf4de042d355e5..dc9248acb26e74883a62d225d4b049b434fa2d78 100644 (file)
@@ -1958,10 +1958,12 @@ standalone.")
                   (catch 'term
                     (while parent
                       (goto-char (treesit-node-start parent))
-                      (when (if (null treesit-simple-indent-standalone-predicate)
-                                (looking-back (rx bol (* whitespace))
-                                              (line-beginning-position))
-                              (funcall parent))
+                      (when
+                          (if (null treesit-simple-indent-standalone-predicate)
+                              (looking-back (rx bol (* whitespace))
+                                            (line-beginning-position))
+                            (funcall treesit-simple-indent-standalone-predicate
+                                     parent))
                         (throw 'term (point)))
                       (setq parent (treesit-node-parent parent)))))))
         (cons 'prev-sibling (lambda (node parent bol &rest _)