From: Yuan Fu Date: Wed, 21 Sep 2022 01:02:16 +0000 (-0700) Subject: Fix treesit-query-validate X-Git-Tag: emacs-29.0.90~1885 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb0464bf4248a8c48e3da2dd0c502091e4ec489a;p=emacs.git 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. --- 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)