From: nverno Date: Sun, 8 Oct 2023 02:36:44 +0000 (-0700) Subject: Fix treesit-query-validate for string input (bug#66400) X-Git-Tag: emacs-29.1.90~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=53292c5d818;p=emacs.git Fix treesit-query-validate for string input (bug#66400) * lisp/treesit.el (treesit-query-validate): Don't expand if QUERY is string. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 98eac7f6d63..e8d57dfcd06 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2528,7 +2528,9 @@ to the offending pattern and highlight the pattern." (start (nth 1 data)) (inhibit-read-only t)) (erase-buffer) - (insert (treesit-query-expand query)) + (insert (if (stringp query) + query + (treesit-query-expand query))) (goto-char start) (search-forward " " nil t) (put-text-property start (point) 'face 'error)