aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorYuan Fu2024-07-26 22:33:17 -0700
committerYuan Fu2024-07-30 17:09:57 -0700
commite4cd26defc0e1a6deafbe4b2310ebdb3ffa4578f (patch)
treed57a2a02c1f7b2c08ecd146738e4c8f949793c94 /src/bytecode.c
parenta2c439db687774f7b57959c39560993579c5d1bd (diff)
downloademacs-e4cd26defc0e1a6deafbe4b2310ebdb3ffa4578f.tar.gz
emacs-e4cd26defc0e1a6deafbe4b2310ebdb3ffa4578f.zip
"Separate" tree-sitter parser list for indirect buffers
When create a parser for the indirect buffer, set the buffer field of the parser to the indirect buffer, but add the parser to the base buffer's parser list. This way, all the parsers still get buffer updates, but indirect buffer's parsers can have different narrowing than the parsers of the base buffer. When returning the parser list of a buffer, do filtering and only return the parser for that buffer. From user's POV, indirect buffers appear to have their own parser list. * doc/lispref/parsing.texi (Using Parser): Remove the text describing indirect buffer's special case. * src/treesit.c (Ftreesit_parser_create): When create a parser for the indirect buffer, set the buffer field of the parser to the indirect buffer, but add the parser to the base buffer's parser list. (Ftreesit_parser_list): Filter parser list, only return parsers for this buffer. xx
Diffstat (limited to 'src/bytecode.c')
0 files changed, 0 insertions, 0 deletions