From 5ba9ee88f2bf6746a8161773b42b3cf4a4436c67 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Thu, 13 Feb 2025 20:30:09 -0800 Subject: [PATCH] ; Fix standalone-parent preset for tree-sitter * lisp/treesit.el (treesit-simple-indent-presets): Fix typo. (cherry picked from commit adabee88730017e81bbb0ee761b6720fd579535d) --- lisp/treesit.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index 23daeee8036..dc9248acb26 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -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 _) -- 2.39.5