diff options
| author | Yuan Fu | 2025-01-17 17:40:04 -0800 |
|---|---|---|
| committer | Yuan Fu | 2025-01-17 17:40:04 -0800 |
| commit | f7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c (patch) | |
| tree | 97d8610e1bec33991814112bdbc67236e776855e /src | |
| parent | 197d09a5fa9e94a09b7569a42480253138a5b2fd (diff) | |
| download | emacs-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