From cb0464bf4248a8c48e3da2dd0c502091e4ec489a Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 20 Sep 2022 18:02:16 -0700 Subject: [PATCH] Fix treesit-query-validate * lisp/treesit.el (treesit-query-validate): Add a call to treesit-query-expand so this function works on both sexp and string query, as expected. --- lisp/treesit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index 709f826f325..9750ac7b7b9 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1079,7 +1079,7 @@ to the offending pattern and highlight the pattern." (message (nth 0 data)) (start (nth 1 data))) (erase-buffer) - (insert query) + (insert (treesit-query-expand query)) (goto-char start) (search-forward " " nil t) (put-text-property start (point) 'face 'error) -- 2.39.5