1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
emacs/doc
Yuan Fu afbce8bb46
Improve tree-sitter indent anchor prev-adaptive-prefix (bug#61314)
Now prev-adaptive-prefix looks at the current line and checks if it
begins with a prefix itself.  If it does, prev-adaptive-prefix tries
to place the anchor before the prefix on the previous line, rather
than after it.

 - prev line
 - this line -> This line starts with a "-", i.e., begins with a
                prefix, so we place the anchor at the beginning of the
                 "-" of the previous line, rather than after it

 - prev line
   this line -> This line doesn't start with a prefix, so the anchor
                is placed after the previous line's "-".

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el:
(treesit-simple-indent-presets): Add local variable
this-line-has-prefix, base what anchor to return on the value of
this-line-has-prefix and whether the prev line has a prefix.
2023-02-19 12:34:19 -08:00
..
emacs ; * doc/emacs/dired.texi (Image-Dired): Fix last change. 2023-02-19 17:09:18 +02:00
lispintro ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lispref Improve tree-sitter indent anchor prev-adaptive-prefix (bug#61314) 2023-02-19 12:34:19 -08:00
man ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
misc Delete redundant question from Gnus FAQ 2023-02-18 13:35:37 +01:00