summaryrefslogtreecommitdiff
path: root/lisp/org/ob-octave.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-02-19 12:22:27 -0800
committerYuan Fu <casouri@gmail.com>2023-02-19 12:34:19 -0800
commitafbce8bb46798518998f517cbacdbd65d4531a3f (patch)
tree3062209a032808165a8906d24440693d0e5e078e /lisp/org/ob-octave.el
parent2e6093b425e21551806abed746765631a00942d6 (diff)
downloademacs-afbce8bb46798518998f517cbacdbd65d4531a3f.tar.gz
emacs-afbce8bb46798518998f517cbacdbd65d4531a3f.tar.bz2
emacs-afbce8bb46798518998f517cbacdbd65d4531a3f.zip
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.
Diffstat (limited to 'lisp/org/ob-octave.el')
0 files changed, 0 insertions, 0 deletions