projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c61a30
)
; Fix tree-sitter indent anchor preset
author
Yuan Fu
<casouri@gmail.com>
Tue, 17 Jan 2023 09:20:51 +0000
(
01:20
-0800)
committer
Yuan Fu
<casouri@gmail.com>
Tue, 17 Jan 2023 09:20:51 +0000
(
01:20
-0800)
* lisp/treesit.el:
(treesit-simple-indent-presets): Fix prev-adaptive-prefix.
lisp/treesit.el
patch
|
blob
|
history
diff --git
a/lisp/treesit.el
b/lisp/treesit.el
index 5e6f109531e0bcdfae65ac134df4c57f26c2ca1b..4c31ecb0d292bde12d3ce2f7eaa6f037714b161b 100644
(file)
--- a/
lisp/treesit.el
+++ b/
lisp/treesit.el
@@
-1152,6
+1152,9
@@
See `treesit-simple-indent-presets'.")
(and (>= (point) comment-start-bol)
adaptive-fill-regexp
(looking-at adaptive-fill-regexp)
+ ;; If previous line is an empty line, don't
+ ;; indent.
+ (not (looking-at (rx (* whitespace) eol)))
(match-end 0))))))
;; TODO: Document.
(cons 'grand-parent