mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Fix tree-sitter indent preset function (bug#60270)
* lisp/treesit.el (treesit-simple-indent-presets): Fix prev-adaptive-prefix so it doesn't return nil if the previous line has no prefix. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.
This commit is contained in:
parent
352e41016b
commit
3d1e74c82a
@ -1152,7 +1152,6 @@ See `treesit-simple-indent-presets'.")
|
||||
(and (>= (point) comment-start-bol)
|
||||
adaptive-fill-regexp
|
||||
(looking-at adaptive-fill-regexp)
|
||||
(> (match-end 0) (match-beginning 0))
|
||||
(match-end 0))))))
|
||||
;; TODO: Document.
|
||||
(cons 'grand-parent
|
||||
|
@ -133,6 +133,20 @@ Name: Multiline Block Comments 4 (bug#60270)
|
||||
*/
|
||||
=-=-=
|
||||
|
||||
Name: Multiline Block Comments 5 (bug#60270)
|
||||
|
||||
=-=
|
||||
/*
|
||||
line one
|
||||
line 2
|
||||
*/
|
||||
=-=
|
||||
/*
|
||||
line one
|
||||
line 2
|
||||
*/
|
||||
=-=-=
|
||||
|
||||
|
||||
Code:
|
||||
(lambda ()
|
||||
|
Loading…
Reference in New Issue
Block a user