[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 _)
- master updated (4afd1eca366 -> de98b5a24f2), Yuan Fu, 2024/12/01
- master c65c5d02224 01/11: Improve c-ts-mode compound indents (bug#74507), Yuan Fu, 2024/12/01
- master d0b918d8f3c 04/11: Add treesit-explore command, Yuan Fu, 2024/12/01
- master 4afdb7e80fe 05/11: ; Minor simplification for tree-sitter indent preset column-0,
Yuan Fu <=
- master 63d69bd1549 07/11: Use new baseline indent rule in c-ts-mode, Yuan Fu, 2024/12/01
- master 9acf6eff01a 10/11: Standardize and promote c-ts-mode's custom matcher and anchor, Yuan Fu, 2024/12/01
- master de98b5a24f2 11/11: ; Indent by 8 in BSD indent tests for c-ts-mode, Yuan Fu, 2024/12/01
- master 1e44c63fcad 03/11: Allow treesit-simple-indent's rule to be a single function, Yuan Fu, 2024/12/01
- master 1d425125694 02/11: Refactor treesit--indent-1, Yuan Fu, 2024/12/01
- master e37cd4fa597 06/11: Add baseline tree-sitter indent rule for C-like languages, Yuan Fu, 2024/12/01
- master 44fcd37a486 08/11: Add more c-ts-mode indent tests, Yuan Fu, 2024/12/01
- master 994258f5567 09/11: Remove unused functions in c-ts-mode, Yuan Fu, 2024/12/01