summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2025-03-13 00:33:47 -0700
committerYuan Fu <casouri@gmail.com>2025-03-13 20:09:03 -0700
commitdefc55bb6f954276a1cb9e3b5c50251ba5e5b40f (patch)
treeed7f75376540d708e5f47cf6f671bdcf361e5d62 /lisp/subr.el
parent20ac26e6751664b08636d16e515abfa1b8419a2d (diff)
downloademacs-defc55bb6f954276a1cb9e3b5c50251ba5e5b40f.tar.gz
emacs-defc55bb6f954276a1cb9e3b5c50251ba5e5b40f.tar.bz2
emacs-defc55bb6f954276a1cb9e3b5c50251ba5e5b40f.zip
Fix treesit-parser-create behavior regarding indirect buffers
The previous fix fixed the problem that treesit-parser-create always use the current buffer, but that introduce another subtle problem: if an indirect buffer creates a parser, the parser saves the base buffer rather than the indirect buffer. In Emacs 29, if you create a parser in an indirect buffer, the parser saves the indirect buffer. This change of behavior breaks some existing use-cases for people using indirect buffer with tree-sitter. In Emacs 31, indirect buffers and base buffer get their own parser list, so this problem doesn't exist anymore. The fix is only for Emacs 30. * src/treesit.c (Ftreesit_parser_create): Use the buffer that's given to treesit-parser-create, even if it's an indirect buffer.
Diffstat (limited to 'lisp/subr.el')
0 files changed, 0 insertions, 0 deletions