diff options
| author | Yuan Fu | 2025-01-17 18:24:45 -0800 |
|---|---|---|
| committer | Yuan Fu | 2025-01-17 18:24:45 -0800 |
| commit | fae424aba97163738f6666ebec1351ceff4b5b2b (patch) | |
| tree | f77657f1070b18f806816f671b2b946289548e47 /src | |
| parent | f7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c (diff) | |
| download | emacs-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.c | 5 |
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 | |||
| 1946 | regions should come in order in the list. Signal | 1946 | regions 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 |
| 1948 | else went wrong. If RANGES is nil, the PARSER is to parse the whole | 1948 | else went wrong. If RANGES is nil, the PARSER is to parse the whole |
| 1949 | buffer. */) | 1949 | buffer. |
| 1950 | |||
| 1951 | DO NOT modify RANGES after passing it to this function, as RANGES is | ||
| 1952 | saved 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); |