diff options
| author | Yuan Fu | 2022-09-20 18:10:01 -0700 |
|---|---|---|
| committer | Yuan Fu | 2022-09-20 18:36:52 -0700 |
| commit | 361eaae71e30d9554bb78d9ccaeddf3e006115c0 (patch) | |
| tree | f42750a453d9328d165f34958598197da21e01df | |
| parent | cb0464bf4248a8c48e3da2dd0c502091e4ec489a (diff) | |
| download | emacs-361eaae71e30d9554bb78d9ccaeddf3e006115c0.tar.gz emacs-361eaae71e30d9554bb78d9ccaeddf3e006115c0.zip | |
Improve treesit-query-capture
* src/treesit.c (Ftreesit_query_capture): Add a suggestion in the
signal message.
| -rw-r--r-- | src/treesit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/treesit.c b/src/treesit.c index 775f823fb3e..eb323e6360c 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -1727,10 +1727,11 @@ query. */) | |||
| 1727 | &error_offset, &error_type); | 1727 | &error_offset, &error_type); |
| 1728 | if (lisp_query == NULL) | 1728 | if (lisp_query == NULL) |
| 1729 | { | 1729 | { |
| 1730 | xsignal2 (Qtreesit_query_error, | 1730 | xsignal3 (Qtreesit_query_error, |
| 1731 | build_string | 1731 | build_string |
| 1732 | (ts_query_error_to_string (error_type)), | 1732 | (ts_query_error_to_string (error_type)), |
| 1733 | make_fixnum (error_offset + 1)); | 1733 | make_fixnum (error_offset + 1), |
| 1734 | build_pure_c_string("Debug the query with `treesit-query-validate'")); | ||
| 1734 | } | 1735 | } |
| 1735 | /* We don't need need to free TS_QUERY and CURSOR, they are stored | 1736 | /* We don't need need to free TS_QUERY and CURSOR, they are stored |
| 1736 | in a lisp object, which is tracked by gc. */ | 1737 | in a lisp object, which is tracked by gc. */ |