diff options
| author | Yuan Fu | 2024-11-29 20:39:00 -0800 |
|---|---|---|
| committer | Yuan Fu | 2024-12-01 17:53:22 -0800 |
| commit | 4afdb7e80febd56f4024bad0aff4356198f6ce53 (patch) | |
| tree | 309acba9f332ae884c1b01a1af6a8aa4069ae388 | |
| parent | d0b918d8f3cc0779fa73b395b6384c8a04b0c0ba (diff) | |
| download | emacs-4afdb7e80febd56f4024bad0aff4356198f6ce53.tar.gz emacs-4afdb7e80febd56f4024bad0aff4356198f6ce53.zip | |
; Minor simplification for tree-sitter indent preset column-0
* lisp/treesit.el (treesit-simple-indent-presets): Simplify.
| -rw-r--r-- | lisp/treesit.el | 5 |
1 files changed, 1 insertions, 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.") | |||
| 1744 | (forward-line -1) | 1744 | (forward-line -1) |
| 1745 | (skip-chars-forward " \t") | 1745 | (skip-chars-forward " \t") |
| 1746 | (point)))) | 1746 | (point)))) |
| 1747 | (cons 'column-0 (lambda (_n _p bol &rest _) | 1747 | (cons 'column-0 (lambda (&rest _) (pos-bol))) |
| 1748 | (save-excursion | ||
| 1749 | (goto-char bol) | ||
| 1750 | (line-beginning-position)))) | ||
| 1751 | ;; TODO: Document. | 1748 | ;; TODO: Document. |
| 1752 | (cons 'and (lambda (&rest fns) | 1749 | (cons 'and (lambda (&rest fns) |
| 1753 | (lambda (node parent bol &rest _) | 1750 | (lambda (node parent bol &rest _) |