diff options
Diffstat (limited to 'src/treesit.c')
| -rw-r--r-- | src/treesit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/treesit.c b/src/treesit.c index 5e1e9b01059..2372944e166 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -4148,7 +4148,8 @@ PREDICATE can be a symbol representing a thing in | |||
| 4148 | `treesit-thing-settings', or a predicate, like regexp matching node | 4148 | `treesit-thing-settings', or a predicate, like regexp matching node |
| 4149 | type, etc. See `treesit-thing-settings' for more details. | 4149 | type, etc. See `treesit-thing-settings' for more details. |
| 4150 | 4150 | ||
| 4151 | Return non-nil if NODE matches PREDICATE, nil otherwise. | 4151 | Return non-nil if NODE matches PREDICATE, nil otherwise. If NODE is |
| 4152 | nil, return nil. | ||
| 4152 | 4153 | ||
| 4153 | Signals `treesit-invalid-predicate' if there's no definition of THING | 4154 | Signals `treesit-invalid-predicate' if there's no definition of THING |
| 4154 | in `treesit-thing-settings', or if PREDICATE is malformed. If | 4155 | in `treesit-thing-settings', or if PREDICATE is malformed. If |
| @@ -4156,6 +4157,8 @@ IGNORE-MISSING is non-nil, don't signal an error for missing THING | |||
| 4156 | definition, but still signal for malformed PREDICATE. */) | 4157 | definition, but still signal for malformed PREDICATE. */) |
| 4157 | (Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing) | 4158 | (Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing) |
| 4158 | { | 4159 | { |
| 4160 | if (NILP (node)) return Qnil; | ||
| 4161 | |||
| 4159 | CHECK_TS_NODE (node); | 4162 | CHECK_TS_NODE (node); |
| 4160 | 4163 | ||
| 4161 | Lisp_Object parser = XTS_NODE (node)->parser; | 4164 | Lisp_Object parser = XTS_NODE (node)->parser; |