From: Yuan Fu Date: Sat, 30 Nov 2024 04:39:00 +0000 (-0800) Subject: ; Minor simplification for tree-sitter indent preset column-0 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9a7136e82539019760112b17f10463e93ff17d3d;p=emacs.git ; Minor simplification for tree-sitter indent preset column-0 * lisp/treesit.el (treesit-simple-indent-presets): Simplify. (cherry picked from commit 4afdb7e80febd56f4024bad0aff4356198f6ce53) --- 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 _)