[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/tree-sitter bd13ce184b 1/4: * lisp/treesit.el (treesit-font-lock
From: |
Yuan Fu |
Subject: |
feature/tree-sitter bd13ce184b 1/4: * lisp/treesit.el (treesit-font-lock-rules): Warn about :feature. |
Date: |
Mon, 17 Oct 2022 04:52:53 -0400 (EDT) |
branch: feature/tree-sitter
commit bd13ce184bfaf43f905faff64c5306ff3518f892
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
* lisp/treesit.el (treesit-font-lock-rules): Warn about :feature.
---
lisp/treesit.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 004e79b40e..86da9e1586 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -414,6 +414,9 @@ ignored.
(when (null current-language)
(signal 'treesit-font-lock-error
`("Language unspecified, use :language keyword to specify
a language for this query" ,token)))
+ (when (null current-feature)
+ (signal 'treesit-font-lock-error
+ `("Feature unspecified, use :feature keyword to specify
the feature name for this query" ,token)))
(if (treesit-compiled-query-p token)
(push `(,current-language token) result)
(push `(,(treesit-query-compile current-language token)