aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuan Fu2025-01-17 17:40:04 -0800
committerYuan Fu2025-01-17 17:40:04 -0800
commitf7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c (patch)
tree97d8610e1bec33991814112bdbc67236e776855e /src
parent197d09a5fa9e94a09b7569a42480253138a5b2fd (diff)
downloademacs-f7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c.tar.gz
emacs-f7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c.zip
Make sure treesit.el doesn't create parsers by itself (bug#75456)
Up to this point, functions in treesit.el (font-lock/indentation/etc) creates a parser if one doesn't exist. This doesn't work well with local parsers, because local parsers are not visible at global level and font-lock or indentation functions might accidentally create a global parser for an embedded language. The solution is to not create parsers automatically. This has the potential of breaking things, but I don't expect any actual breakage: all the major modes create parsers they need in the major mode body, even though previously it isn't technically necessary. * lisp/treesit.el (treesit-buffer-root-node): (treesit--update-ranges-local): (treesit-update-ranges): (treesit--guess-primary-parser): Use treesit-parser-list instead of treesit-parser-create.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions