emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4afdb7e80fe 05/11: ; Minor simplification for tree-sitter indent


From: Yuan Fu
Subject: master 4afdb7e80fe 05/11: ; Minor simplification for tree-sitter indent preset column-0
Date: Sun, 1 Dec 2024 21:10:22 -0500 (EST)

branch: master
commit 4afdb7e80febd56f4024bad0aff4356198f6ce53
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    ; Minor simplification for tree-sitter indent preset column-0
    
    * lisp/treesit.el (treesit-simple-indent-presets): Simplify.
---
 lisp/treesit.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/treesit.el b/lisp/treesit.el
index 2dd556e55ab..3539942f19a 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1744,10 +1744,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 _)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]