From: Yuan Fu Date: Fri, 14 Feb 2025 04:30:09 +0000 (-0800) Subject: ; Fix standalone-parent preset for tree-sitter X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ba9ee88f2bf6746a8161773b42b3cf4a4436c67;p=emacs.git ; Fix standalone-parent preset for tree-sitter * lisp/treesit.el (treesit-simple-indent-presets): Fix typo. (cherry picked from commit adabee88730017e81bbb0ee761b6720fd579535d) --- 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 _)