[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 53292c5d818 1/2: Fix treesit-query-validate for string input (b
From: |
Yuan Fu |
Subject: |
emacs-29 53292c5d818 1/2: Fix treesit-query-validate for string input (bug#66400) |
Date: |
Mon, 9 Oct 2023 01:02:40 -0400 (EDT) |
branch: emacs-29
commit 53292c5d8186dfac5c82b0d16a10d91c691ae75f
Author: nverno <noah.v.peart@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
Fix treesit-query-validate for string input (bug#66400)
* lisp/treesit.el (treesit-query-validate): Don't expand if QUERY is
string.
---
lisp/treesit.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)