aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuan Fu2025-01-17 18:24:45 -0800
committerYuan Fu2025-01-17 18:24:45 -0800
commitfae424aba97163738f6666ebec1351ceff4b5b2b (patch)
treef77657f1070b18f806816f671b2b946289548e47 /src
parentf7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c (diff)
downloademacs-fae424aba97163738f6666ebec1351ceff4b5b2b.tar.gz
emacs-fae424aba97163738f6666ebec1351ceff4b5b2b.zip
Fix treesit.el tests
* lisp/treesit.el (treesit--imenu-merge-entries): (Ftreesit_parser_set_included_ranges): Warn in the docstring that the function is destructive/owns the argument. * test/src/treesit-tests.el (treesit-range-fixup-after-edit): (treesit-imenu): Fix tests.
Diffstat (limited to 'src')
-rw-r--r--src/treesit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/treesit.c b/src/treesit.c
index 5de75219907..2f06de67ad8 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1946,7 +1946,10 @@ which the parser should operate. Regions must not overlap, and the
1946regions should come in order in the list. Signal 1946regions should come in order in the list. Signal
1947`treesit-set-range-error' if the argument is invalid, or something 1947`treesit-set-range-error' if the argument is invalid, or something
1948else went wrong. If RANGES is nil, the PARSER is to parse the whole 1948else went wrong. If RANGES is nil, the PARSER is to parse the whole
1949buffer. */) 1949buffer.
1950
1951DO NOT modify RANGES after passing it to this function, as RANGES is
1952saved to PARSER internally. */)
1950 (Lisp_Object parser, Lisp_Object ranges) 1953 (Lisp_Object parser, Lisp_Object ranges)
1951{ 1954{
1952 treesit_check_parser (parser); 1955 treesit_check_parser (parser);