1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 09:20:54 -08:00

Improve treesit-query-capture

* src/treesit.c (Ftreesit_query_capture): Add a suggestion in the
signal message.
This commit is contained in:
Yuan Fu 2022-09-20 18:10:01 -07:00
parent cb0464bf42
commit 361eaae71e
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -1727,10 +1727,11 @@ query. */)
&error_offset, &error_type);
if (lisp_query == NULL)
{
xsignal2 (Qtreesit_query_error,
xsignal3 (Qtreesit_query_error,
build_string
(ts_query_error_to_string (error_type)),
make_fixnum (error_offset + 1));
make_fixnum (error_offset + 1),
build_pure_c_string("Debug the query with `treesit-query-validate'"));
}
/* We don't need need to free TS_QUERY and CURSOR, they are stored
in a lisp object, which is tracked by gc. */