summaryrefslogtreecommitdiff
path: root/lisp/textmodes/sgml-mode.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-12-27 17:02:03 -0800
committerYuan Fu <casouri@gmail.com>2022-12-27 17:41:43 -0800
commitba1ddea9dabf51c9c6e463d667bcce0b48294453 (patch)
tree5553592930b6e4482b351090e6a3adaca134c0d1 /lisp/textmodes/sgml-mode.el
parent7512b9025a152ea953918e1c0748b695b742b4b6 (diff)
downloademacs-ba1ddea9dabf51c9c6e463d667bcce0b48294453.tar.gz
emacs-ba1ddea9dabf51c9c6e463d667bcce0b48294453.tar.bz2
emacs-ba1ddea9dabf51c9c6e463d667bcce0b48294453.zip
Fix treesit--things-around (bug#60355)
Current implementation of treesit--things-around only searches forward for REGEXP and go up the tree until it finds a valid thing, if nothing matches it gives up. This makes it sometimes miss defuns. The new implementation tries multiple times (of search forward + go up) until it exhausts all possible defun nodes. * lisp/treesit.el (treesit--things-around): New implementation. (treesit--navigate-defun): Refactor to use treesit-node-top-level to simplify code, and add some guards in the predicate function. * test/src/treesit-tests.el: (treesit--ert-defun-navigation-elixir-program): New variable. (treesit-defun-navigation-nested-4): New test.
Diffstat (limited to 'lisp/textmodes/sgml-mode.el')
0 files changed, 0 insertions, 0 deletions