summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2024-02-03 21:24:29 -0800
committerYuan Fu <casouri@gmail.com>2024-02-04 16:48:59 -0800
commit9dbbf93a4a08f71cf5f2278ec2a22a722fe0e0f7 (patch)
treeef74434f623af8b1234c8dcddc1459b3bebd2282 /lisp/emacs-lisp/regexp-opt.el
parentb2d350cfc0bf8f0e3198bffcebe60a43341fb340 (diff)
downloademacs-9dbbf93a4a08f71cf5f2278ec2a22a722fe0e0f7.tar.gz
emacs-9dbbf93a4a08f71cf5f2278ec2a22a722fe0e0f7.tar.bz2
emacs-9dbbf93a4a08f71cf5f2278ec2a22a722fe0e0f7.zip
Improve treesit-forward-sexp behavior for leaf nodes (bug#68899)
treesit-forward-sexp uses treesit--navigate-thing with 'restricted' tactic. In this tactic we don't move over the parent thing. However, this makes forward-sexp useless for symbols when point is in the symbol rather than at the beginning of it: in that case, the symbol is considered parent and treesit-forward-sexp won't move to the end of it. To solve that, we allow to move across the parent even in 'restricted' mode if the parent is a leaf thing. Here, "leaf thing" is defined as "doesn't have any child 'thing' inside it". * lisp/treesit.el (treesit--navigate-thing): Move over parent in 'restricted' tactic if the parent is a leaf thing.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
0 files changed, 0 insertions, 0 deletions