From 9a7136e82539019760112b17f10463e93ff17d3d Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Fri, 29 Nov 2024 20:39:00 -0800 Subject: [PATCH] ; Minor simplification for tree-sitter indent preset column-0 * lisp/treesit.el (treesit-simple-indent-presets): Simplify. (cherry picked from commit 4afdb7e80febd56f4024bad0aff4356198f6ce53) --- lisp/treesit.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index 1c57191fe53..628a8b3c766 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1740,10 +1740,7 @@ OFFSET is the indent offset; if it doesn't match, return nil.") (forward-line -1) (skip-chars-forward " \t") (point)))) - (cons 'column-0 (lambda (_n _p bol &rest _) - (save-excursion - (goto-char bol) - (line-beginning-position)))) + (cons 'column-0 (lambda (&rest _) (pos-bol))) ;; TODO: Document. (cons 'and (lambda (&rest fns) (lambda (node parent bol &rest _) -- 2.39.5